Repository navigation
config(opencode): one-flip provider switchboard — disabled_providers is the single switch (#1460) - #1465
Conversation
…is the single switch, definitions always in place (#1460) Restore the four commented-out provider definitions (cloudflare-gateway, cloudflare-workers-ai, openrouter, muse) as live definitions held off solely by disabled_providers, and add muse to the list (it stays banned: duplicate door into the Meta pool). Add the PROVIDER SWITCHBOARD comment at the list: flip = add/remove one line; built-ins need no definition; route pools tolerate off leaves. Claude worked example: removing the claude-code line is the whole enable — definition, catalog, and haiku-plan seat are already in place; only the claude.ai sign-in remains. Restoring the Haiku default is documented as an optional preference, not part of enabling. Verified on the laptop with opencode v2.0.30 (standalone private server, plugin array emptied in the scratch copies only — plugin activation is orthogonal and already proven on the live server): config loads rc=0 with Claude disabled (0 claude-code models); with the single disabled_providers line removed, the model catalog diff is exactly +claude-code/claude-haiku-5-5 and nothing else; the restored definitions leak no models while disabled. Semantic diff vs HEAD: model_routes, agent, default, and every pre-existing provider definition byte-identical; additions only.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Closes #1460. Drew (2026-10-27): "make easy config to enable disable providers — I'll add it back one day and want it to just work besides fixing signin."
The flip
disabled_providersis now THE provider switchboard, with a comment block at the list explaining the whole mechanism. A provider is ON unless its id is in the list; turning it off or back on is a one-line edit there — nothing else in the file changes:Claude, the worked example:
claude-codesits in the list today (free-tier pause, PR #1316). The day the plan comes back, Drew deletes the"claude-code"line and Claude is live — its full definition, model catalog, and its seat inhaiku-plan(consumed by scout / workhorse / speed / luna-haiku-100k) are already in place. The ONLY remaining step is the claude.ai sign-in, which lives outside this file. The old header instruction said re-enabling also required restoring the"default"; that restore is now documented as an optional preference, explicitly not part of enabling.What changed (one file:
.opencode/opencode.jsonc)disabled_providers: the mechanism, the built-in exception (google-vertex / nvidia / vercel / huggingface / opencode / github-copilot ship their catalogs with opencode, so the list alone switches them — no local definition by design), the pool-tolerance note, the Claude example, the permanentmuseexception, and the design-trio exception below.cloudflare-gateway,cloudflare-workers-ai,openrouter,muse. Previously re-enabling one of these took two edits (uncomment + unlist); now it's the same one flip as every other provider.museadded todisabled_providers. It stays OFF — the standing ban stands (duplicate door into the same single Meta pool asmeta;metais the only Meta door, and the warning comment at its definition is preserved). Before this PR its off-state wasn't even visible in the list.defaultcomment now point at the switchboard and mark the Haiku-default restore as optional.experimental.model_routes,agent,default, and every pre-existing provider definition are byte-identical; the only additions are the four restored definitions and"muse"in the list. Pool membership and ordering untouched.Known exception, named in the switchboard comment: the
design-code/code-design/open-designproxy blocks stay commented out — that region holds four blocks for three ids (two keyeddesign-code), so it can't join the one-flip pattern until a dedupe decision is made. They're off via the list either way; their live door isopendesign.Verification (laptop, opencode v2.0.30 fork)
Loaded the config in a standalone private server from scratch copies (hermetic XDG; the
pluginarray was emptied in the scratch copies only — the full plugin set failed to finish activating in the hermetic env, which is orthogonal to provider resolution and already proven on the live server):claude-code/*.disabled_providers): loads rc=0, and the model-catalog diff against the disabled state is exactly +claude-code/claude-haiku-5-5— nothing else appears or breaks.muse/,openrouter/,cloudflare-gateway/,cloudflare-workers-ai/all absent from the catalog in both states).Deploy note (not in this PR)
This changes the canonical file only. The laptop's live config (
~/code/.opencode/opencode.jsonc, symlinked from~/.config/opencode) is reconciled with canonical HEAD under #1425 — that deploy/reload step is what makes the switchboard live on the laptop, and it remains #1425's scope. Once deployed, a future provider flip is: edit the one list in the repo → PR → deploy, with no definition archaeology. Routing policy alignment stays with #1272.Need help on this PR? Tag
@codesmith-botwith what you need.