mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
refactor(presets): drop redundant 'OpenAI Compatible' preset
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.
This commit is contained in:
@@ -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: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user