From acd64a049fdf368b5afefe02a2383435ae917955 Mon Sep 17 00:00:00 2001 From: Owen Date: Wed, 19 Aug 2026 15:45:40 -0400 Subject: [PATCH] Show that opencode has providers warning --- src/lib/aiClientConfig.ts | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/lib/aiClientConfig.ts b/src/lib/aiClientConfig.ts index 0ae0517ae..c3dbf96f5 100644 --- a/src/lib/aiClientConfig.ts +++ b/src/lib/aiClientConfig.ts @@ -293,7 +293,7 @@ function buildOpencodeGuide( ' "options": {', ` "baseURL": "${endpoint}/v1"`, " }", - " }", + " },", ' "openai": {', ' "options": {', ` "baseURL": "${endpoint}/v1"`, @@ -314,12 +314,26 @@ function buildOpencodeGuide( ' "anthropic": {', ' "type": "api",', ` "key": "${key}"`, + " },", + ' "openai": {', + ' "type": "api",', + ` "key": "${key}"`, " }", "}" ].join("\n"), auth ); + const moreProviders = block( + "opencode-more-providers", + "More providers", + () => + "OpenCode configures providers individually, so Anthropic and OpenAI are just the ones set up above. " + + 'You can point any other OpenCode-supported provider (e.g. "openrouter", "google", "groq") at this gateway the same way: add a matching entry under "provider" in opencode.json, and under auth.json if it needs an API key.', + auth, + "steps" + ); + return { id: "opencode", name: AI_CLIENT_NAMES.opencode, @@ -329,7 +343,10 @@ function buildOpencodeGuide( id: "default", label: "Default", relation: "steps", - blocks: [config, authFile] + blocks: + auth.mode === "keyed" + ? [config, authFile, moreProviders] + : [config, moreProviders] } ] };