Show that opencode has providers warning

This commit is contained in:
Owen
2026-08-19 15:45:40 -04:00
parent 967deaff88
commit acd64a049f
+19 -2
View File
@@ -293,7 +293,7 @@ function buildOpencodeGuide(
' "options": {', ' "options": {',
` "baseURL": "${endpoint}/v1"`, ` "baseURL": "${endpoint}/v1"`,
" }", " }",
" }", " },",
' "openai": {', ' "openai": {',
' "options": {', ' "options": {',
` "baseURL": "${endpoint}/v1"`, ` "baseURL": "${endpoint}/v1"`,
@@ -314,12 +314,26 @@ function buildOpencodeGuide(
' "anthropic": {', ' "anthropic": {',
' "type": "api",', ' "type": "api",',
` "key": "${key}"`, ` "key": "${key}"`,
" },",
' "openai": {',
' "type": "api",',
` "key": "${key}"`,
" }", " }",
"}" "}"
].join("\n"), ].join("\n"),
auth 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 { return {
id: "opencode", id: "opencode",
name: AI_CLIENT_NAMES.opencode, name: AI_CLIENT_NAMES.opencode,
@@ -329,7 +343,10 @@ function buildOpencodeGuide(
id: "default", id: "default",
label: "Default", label: "Default",
relation: "steps", relation: "steps",
blocks: [config, authFile] blocks:
auth.mode === "keyed"
? [config, authFile, moreProviders]
: [config, moreProviders]
} }
] ]
}; };