Skip to content

config(opencode): one-flip provider switchboard — disabled_providers is the single switch (#1460) - #1465

Merged
dezren39 merged 1 commit into
mainfrom
config/provider-switchboard-1460
Oct 30, 2026
Merged

dezren39 merged 1 commit into
mainfrom
config/provider-switchboard-1460

Conversation

@dezren39

@dezren39 dezren39 commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

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_providers is 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:

  "disabled_providers": [
    "google",
    "google-vertex",
    // …
    "claude-code",
    "muse"
  ],

Claude, the worked example: claude-code sits 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 in haiku-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)

  • Switchboard comment added directly above 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 permanent muse exception, and the design-trio exception below.
  • Four commented-out definitions restored as live definitions, held off solely by the list: 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.
  • muse added to disabled_providers. It stays OFF — the standing ban stands (duplicate door into the same single Meta pool as meta; meta is 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.
  • The three per-provider "commented out" notes became short "OFF via disabled_providers — see the switchboard" pointers. The header note and the default comment now point at the switchboard and mark the Haiku-default restore as optional.
  • Nothing else. Verified by semantic (comment-stripped) diff against HEAD: 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-design proxy blocks stay commented out — that region holds four blocks for three ids (two keyed design-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 is opendesign.

Verification (laptop, opencode v2.0.30 fork)

Loaded the config in a standalone private server from scratch copies (hermetic XDG; the plugin array 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 disabled (this PR's state): loads rc=0, 326 models listed, 0 claude-code/*.
  • Claude flipped on (one line removed from 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.
  • The four restored definitions leak no models while disabled (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.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…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.
@dezren39
dezren39 requested a review from a team as a code owner October 27, 2026 16:29
@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3fc3b58a-a41e-434e-b217-c551d7b8ffe5
Commits

Reviewing files that changed from the base of the PR and between 7ed67f9 and 49e8fac.

Files selected for processing: 1
  • .opencode/opencode.jsonc
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T16:31:43.541412Z 49e8fac PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39 dezren39 added the queue/queued Has a queued queue task label Oct 29, 2026
@dezren39
dezren39 enabled auto-merge October 30, 2026 02:38
@dezren39
dezren39 added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 15c8df6 Oct 30, 2026
4 checks passed
@dezren39
dezren39 deleted the config/provider-switchboard-1460 branch October 30, 2026 04:01
@dezren39 dezren39 removed the queue/queued Has a queued queue task label Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

opencode config: one-flip provider switchboard — disabled_providers as the single switch, definitions always in place

1 participant