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:
Jason
2026-06-26 20:19:27 +08:00
parent 430ddf92bd
commit dd6a951c34
3 changed files with 65 additions and 1 deletions
+2 -1
View File
@@ -281,7 +281,8 @@ export const providerPresets: ProviderPreset[] = [
},
{
name: "OpenCode Go",
websiteUrl: "https://opencode.ai",
websiteUrl: "https://opencode.ai/go",
apiKeyUrl: "https://opencode.ai/auth",
settingsConfig: {
env: {
ANTHROPIC_BASE_URL: "https://opencode.ai/zen/go",
+32
View File
@@ -799,6 +799,38 @@ requires_openai_auth = true`,
icon: "nvidia",
iconColor: "#000000",
},
{
name: "OpenCode Go",
websiteUrl: "https://opencode.ai/go",
apiKeyUrl: "https://opencode.ai/auth",
auth: generateThirdPartyAuth(""),
config: generateThirdPartyConfig(
"opencode_go",
"https://opencode.ai/zen/go/v1",
"glm-5.2",
),
endpointCandidates: ["https://opencode.ai/zen/go/v1"],
apiFormat: "openai_chat",
modelCatalog: modelCatalog([
{ model: "glm-5.2", displayName: "GLM 5.2", contextWindow: 204800 },
{ model: "glm-5.1", displayName: "GLM 5.1", contextWindow: 204800 },
{
model: "kimi-k2.7-code",
displayName: "Kimi K2.7 Code",
contextWindow: 262144,
},
{ model: "deepseek-v4-pro", displayName: "DeepSeek V4 Pro" },
{ model: "deepseek-v4-flash", displayName: "DeepSeek V4 Flash" },
{
model: "mimo-v2.5-pro",
displayName: "MiMo V2.5 Pro",
contextWindow: 1048576,
},
]),
category: "third_party",
icon: "opencode",
iconColor: "#211E1E",
},
{
name: "AiHubMix",
websiteUrl: "https://aihubmix.com",
+31
View File
@@ -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",