mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-28 08:44:41 +08:00
feat(presets): add OpenCode Go subscription preset for Codex and OpenCode
Add OpenCode Go (opencode.ai/zen/go) provider presets across clients: - Codex: openai_chat conversion with model catalog (GLM/Kimi/DeepSeek/MiMo), no static codexChatReasoning so per-model capability is inferred - OpenCode: @ai-sdk/openai-compatible against /zen/go/v1 - Claude: add apiKeyUrl (opencode.ai/auth) and align websiteUrl to /go Auth is a plain pasteable API key (no OAuth). Go splits wire format by model: OpenAI /chat/completions for GLM/Kimi/DeepSeek/MiMo, Anthropic /messages for MiniMax/Qwen; these presets target the chat-format models.
This commit is contained in:
@@ -1046,6 +1046,37 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
name: "OpenCode Go",
|
||||
websiteUrl: "https://opencode.ai/go",
|
||||
apiKeyUrl: "https://opencode.ai/auth",
|
||||
settingsConfig: {
|
||||
npm: "@ai-sdk/openai-compatible",
|
||||
name: "OpenCode Go",
|
||||
options: {
|
||||
baseURL: "https://opencode.ai/zen/go/v1",
|
||||
apiKey: "",
|
||||
setCacheKey: true,
|
||||
},
|
||||
models: {
|
||||
"glm-5.2": { name: "GLM 5.2" },
|
||||
"kimi-k2.7-code": { name: "Kimi K2.7 Code" },
|
||||
"deepseek-v4-pro": { name: "DeepSeek V4 Pro" },
|
||||
"deepseek-v4-flash": { name: "DeepSeek V4 Flash" },
|
||||
"mimo-v2.5-pro": { name: "MiMo V2.5 Pro" },
|
||||
},
|
||||
},
|
||||
category: "third_party",
|
||||
icon: "opencode",
|
||||
iconColor: "#211E1E",
|
||||
templateValues: {
|
||||
apiKey: {
|
||||
label: "API Key",
|
||||
placeholder: "",
|
||||
editorValue: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "AiHubMix",
|
||||
websiteUrl: "https://aihubmix.com",
|
||||
|
||||
Reference in New Issue
Block a user