From bad3610d938579bdf3d4e285cb74fd49b92e29c3 Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 8 Jul 2026 10:22:02 +0800 Subject: [PATCH] refactor(presets): drop redundant 'OpenAI Compatible' preset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the 'OpenAI Compatible' custom-template preset from the OpenCode and OpenClaw preset lists. It was a duplicate entry point: the built-in 'custom' provider flow already exposes an interface-format selector whose default (@ai-sdk/openai-compatible / openai-completions) produces a byte-identical starting config. Having both left two list items pointing to the same place. Existing providers are unaffected — presets only seed form defaults on creation; saved providers store concrete npm/baseUrl/apiKey/models values. The '@ai-sdk/openai-compatible' dropdown label is intentionally kept; it is the format option users pick in the custom flow, not the deleted preset. --- src/config/openclawProviderPresets.ts | 28 ------------------------- src/config/opencodeProviderPresets.ts | 30 --------------------------- 2 files changed, 58 deletions(-) diff --git a/src/config/openclawProviderPresets.ts b/src/config/openclawProviderPresets.ts index 6f770082c..11886f425 100644 --- a/src/config/openclawProviderPresets.ts +++ b/src/config/openclawProviderPresets.ts @@ -2500,32 +2500,4 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [ icon: "aws", iconColor: "#FF9900", }, - - // ========== Custom Template ========== - { - name: "OpenAI Compatible", - websiteUrl: "", - settingsConfig: { - baseUrl: "", - apiKey: "", - api: "openai-completions", - models: [], - }, - category: "custom", - isCustomTemplate: true, - icon: "generic", - iconColor: "#6B7280", - templateValues: { - baseUrl: { - label: "Base URL", - placeholder: "https://api.example.com/v1", - editorValue: "", - }, - apiKey: { - label: "API Key", - placeholder: "", - editorValue: "", - }, - }, - }, ]; diff --git a/src/config/opencodeProviderPresets.ts b/src/config/opencodeProviderPresets.ts index a92a29c1b..cb2fe58c5 100644 --- a/src/config/opencodeProviderPresets.ts +++ b/src/config/opencodeProviderPresets.ts @@ -2019,36 +2019,6 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [ }, }, }, - { - name: "OpenAI Compatible", - websiteUrl: "", - settingsConfig: { - npm: "@ai-sdk/openai-compatible", - options: { - baseURL: "", - apiKey: "", - setCacheKey: true, - }, - models: {}, - }, - category: "custom", - isCustomTemplate: true, - icon: "generic", - iconColor: "#6B7280", - templateValues: { - baseURL: { - label: "Base URL", - placeholder: "https://api.example.com/v1", - editorValue: "", - }, - apiKey: { - label: "API Key", - placeholder: "", - editorValue: "", - }, - }, - }, - { name: "Oh My OpenCode", websiteUrl: "https://github.com/code-yeongyu/oh-my-openagent",