Skip to content

fix(opencode-routes): repair Meta leg, double-door the Antigravity pools, flip deepseek off - #2602

Merged
dezren39 merged 2 commits into
mainfrom
fix/opencode-routes-meta-gemini
Oct 30, 2026
Merged

dezren39 merged 2 commits into
mainfrom
fix/opencode-routes-meta-gemini

Conversation

@dezren39

@dezren39 dezren39 commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Route audit, 2026-10-30 — why Meta and Gemini failed, and the fixes

Evidence base (all read live on the laptop, 2026-10-30 ~01:35–02:00 CDT): the standing server's /api/provider list (opencode 2.0.30), the route_attempt ledger and credential table in ~/.local/share/opencode/opencode.db, the local proxy processes/ports, and live /v1/models catalogs from the Antigravity proxies. No secret values were read out; the one credential identification used the fleet's established sha256-prefix method.

Provider × route table (BEFORE this PR)

Enabled providers (server-resolved): openai, openai.alternate, opendesign, cline-pass, commandcode, meta, antigravity-agy, antigravity-ls, opencode-go, opencode-go.personal, opencode-go.lab, deepseek, + the opencode-route router itself.

Provider In routes? Where
opencode-go.personal / .lab / (base) yes deepseek-flash/pro-plan, haiku, luna, spark, argon, beam, mimo pools
cline-pass yes deepseek pools, spark, mimo
opendesign yes deepseek pools, haiku, luna, sol, mimo
commandcode yes deepseek pools, spark, sol, beam, mimo
openai / openai.alternate yes luna, sol, terra
meta yes spark-plan (contributor), workhorse-primary (plain SKU), summit (contributor)
antigravity-agy yes argon-plan, workhorse-primary (pre-existing burn seats)
antigravity-ls yes gemini-flash-plan (ONLY leaf), sonnet-plan, opus-plan
deepseek NO — enabled but seated nowhere last traffic 2026-10-25

Dormant-by-design leaves (kept, per the switchboard header): claude-code/* in haiku/sonnet/opus plans — the provider is disabled (Claude plan pause) and the leaves rejoin on re-enable. The muse provider stays disabled, permanently, per Drew's order — it is not in any route and this PR does not touch it.

Diagnosis — Meta

The routes were fine; the SKU was not. workhorse-primary (the default model's primary wrapper, weight 1 of 4 picks) sends its Meta leg to meta/muse-spark-1.3. The ledger shows that leaf failing 8/8 attempts since 2026-10-30 03:40Z, all HTTP 403, error text verbatim: "This API key is billed to a Muse Code subscription. Muse Code subscriptions cover requests from the Muse Code client only. Use it in Muse Code, or use a pay-as-you-go API key for other clients." The active meta credential is the Muse Code plan key (sha256 prefix 61a2ae5f88eceb27, matching the fleet record for meta.muse-code-plan.api-key; the credential row is active and unchanged since 2026-10-26). On the same key, muse-spark-1.3-contributor keeps working: 1,420 successes all-time in the ledger, 286 on 2026-10-29 (latest 2026-10-29 12:02Z), with only sporadic 403s. So: not a missing route, not an inactive credential — Meta now client-restricts the plain Spark SKU for this key, and the contributor SKU is the door on the same single Meta plan that still serves this client.

Fix (in this PR): the workhorse-primary Meta leg (target + its weights key) moves to meta/muse-spark-1.3-contributor — same direct meta door, same plan, same weight 1, still burning the Meta plan toward the 2026-11-02 reset as #2173 intended. One-line revert if Meta serves the plain SKU again. (spark-plan and summit already used contributor SKUs and are untouched.)

Diagnosis — Gemini (and the Claude pools' shared fragility)

gemini-flash-plan had exactly one leaf: antigravity-ls/gemini-3.8-flash, served by the local ls proxy on :18745. The ledger's ls failures are all Transport / ConnectionRefused on 2026-10-24/25 (38 for gemini-3.8-flash, 40 for claude-opus-5-5) — the proxy was down in that window and the pool had nothing to fail over to, so the whole Gemini door read as broken. The ls proxy is up now (started 2026-10-28 20:57Z; live catalog probe 2026-10-30: 38 models incl. gemini-3.8-flash).

What this PR does about it: an earlier revision of this PR added antigravity-agy leaves to gemini-flash-plan, sonnet-plan, and opus-plan as second doors. Codex's P1 review caught — and I verified against bin/agy-proxy.mjs — that the agy proxy is text-only: it builds its prompt from body.messages, ignores body.tools, and never returns structured tool calls, so those leaves would silently end tool-using turns with text "successes" and block failover. The leaves are withdrawn (279e306). Instead, each affected pool now carries a dated comment recording its single-door state and why agy is not seated, and the real fix is filed as #2603 (bridge tool calls in agy-proxy). Until that lands, ls is the only tool-capable Antigravity door and these pools ride on its proxy being up — which it currently is.

deepseek flip (the one judgment call)

deepseek was the only enabled provider no tier could reach. Its definition is the DeepSeek official API — a pay-as-you-go funds door, and fleet doctrine is plan pools only; DeepSeek models already reach every tier through the Go/ClinePass/OpenDesign/CommandCode plan doors, and the direct door has taken no traffic since 2026-10-25. Rather than wire a funds door into the pools, this PR flips deepseek into disabled_providers (definition preserved in full, per the switchboard rule; deleting the line re-enables it). After this PR, every enabled provider is route-reachable. If Drew would rather have the direct door seated as a last-resort leaf instead, that is a small follow-up — say the word.

Not a config defect (reported, not changed here)

commandcode attempts are failing with ConnectionRefused right now (latest 2026-10-30 06:07Z; last success 03:04Z): the commandcode proxy on :18748 is simply not running (no listener, no process), while its sibling proxies on :18742–:18746/:18749 are up. The config's port matches the proxy's own default (bin/commandcode-proxy.mjs), so there is nothing to fix in this file — the proxy process needs to be (re)started under whatever supervision the switch establishes. Flagging for the activation step.

Verification

  • The edited file parses as JSONC; a referential-integrity pass confirms every enabled provider is now route-reachable and no leaf names a model missing from its provider's catalog (locally-defined catalogs checked exactly; the Antigravity leaves were additionally checked against the proxies' live /v1/models).
  • opencode-v2 debug config (v2.0.30+ad881d2, the standing server's build) loads the config with exit 0 and no errors. Note: that command merges the passwd-home global config (~/.config/opencode) ahead of any project file, so the resolved routes it prints are the live file's — the shape/schema acceptance is what this check proves; content-level verification is the parse + integrity pass above.
  • Codex P1 on the first revision: accepted and acted on (see the disposition comment); the follow-up commit is the current head.

Activation required

Not live until: (1) the pending NixOS switch deploys this file to ~/.config/opencode/opencode.jsonc (it is byte-identical to this repo file today), and (2) the opencode server restarts/reloads on the new config. Nothing in this PR restarts anything by itself. Suggest also confirming the commandcode proxy (:18748) is running after the switch.

…ols, flip deepseek off

Route audit 2026-10-30 (evidence: route_attempt ledger + credential table + live proxy catalogs on the laptop):

1. workhorse-primary Meta leg: meta/muse-spark-1.3 -> meta/muse-spark-1.3-contributor (target + weights key). The plain SKU fails 8/8 with HTTP 403 since 2026-10-30 03:40Z (Meta: the active key is billed to a Muse Code subscription and is client-restricted); the contributor SKU on the same key/plan succeeded 286x on 2026-10-29. Same direct door, same plan, same weight.
2. gemini-flash-plan: add antigravity-agy/gemini-3.8-flash as second leaf. The pool was single-door on antigravity-ls; 38 ConnectionRefused failures on 2026-10-24/25 while the ls proxy was down.
3. sonnet-plan / opus-plan: add antigravity-agy leaves (same single-live-door fragility; claude-code leaves stay dormant by design).
4. deepseek -> disabled_providers: the DeepSeek official API is a PAYG funds door seated in no route and unused since 2026-10-25; DeepSeek models reach tiers via plan doors. Definition preserved; one-line revert.

Verified: file parses as JSONC; referential-integrity check passes (every enabled provider now route-reachable, no leaf names a missing model); opencode-v2 2.0.30 debug config loads the config set with no errors. Activation: the pending NixOS switch (deploys this file to ~/.config/opencode) + opencode server restart.
@dezren39
dezren39 requested a review from a team as a code owner October 30, 2026 06:35
@coderabbitai

coderabbitai Bot commented Oct 30, 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 14 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: 0de11041-f1f5-4ae6-9539-7ed66a59d80d
Commits

Reviewing files that changed from the base of the PR and between f9268e2 and 279e306.

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 30, 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-30T06:42:27.525884Z 279e306 New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f81befd45e

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .opencode/opencode.jsonc Outdated
Comment on lines +6435 to +6436
"model": "antigravity-agy/claude-sonnet-5-5",
"variants": { "xhigh": "high", "max": "high" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep tool-using pools off agy until it bridges tool calls

For tool-using requests, this new round-robin leaf can silently terminate the agent turn instead of providing a working alternative to ls. bin/agy-proxy.mjs:864-867 constructs the prompt solely from body.messages, ignoring body.tools, and its responses contain only text with finish_reason: 'stop' (lines 1057-1064; streaming behaves the same). Unlike antigravity-ls-proxy.mjs, it never returns structured tool calls. Consequently, specialist, which selects sonnet-plan first, now sends ordinary coding turns to a backend that cannot invoke the caller's tools; a successful text response also prevents failover. The added Gemini Flash and Opus leaves have the same problem. Keep these leaves out of tool-using pools until agy forwards tool definitions and bridges tool-call responses.

Useful? React with 👍 / 👎.

…y (Codex P1, verified)

Codex flagged that bin/agy-proxy.mjs ignores body.tools and never returns structured tool calls, so the antigravity-agy leaves added in the previous commit would silently end tool-using turns with text successes and block failover. Verified against the proxy source (prompt built from body.messages only; responses are text with finish_reason stop; the ls proxy bridges tool calls, agy does not). The three leaves (gemini-flash-plan, sonnet-plan, opus-plan) are removed; in their place, dated comments record the single-door state and the reason agy is not seated. Follow-up filed as issue #2603. The Meta leg fix and the deepseek flip are unaffected.
@dezren39

Copy link
Copy Markdown
Member Author

Codex P1 (agy leaves in tool-using pools) — dispositioned: ACCEPTED, after independent verification against the source.

Verified: bin/agy-proxy.mjs builds its prompt solely from body.messages (formatPrompt / extractLatestUserPrompt) and never reads body.tools; its responses are text content with finish_reason: 'stop' and no structured tool_calls. bin/antigravity-ls-proxy.mjs does bridge tool calls. So an agy leaf in a tool-using pool would indeed end turns with text 'successes' and block failover — worse than the ConnectionRefused it was meant to guard against.

Action taken in 279e306: the three added agy leaves (gemini-flash-plan, sonnet-plan, opus-plan) are removed. In their place, dated comments in each pool record the single-door state and why agy is not seated, so the next auditor does not re-add them. The underlying gap is filed as #2603 (bridge tool calls in agy-proxy); once that lands, agy can be seated as a genuine second Antigravity door.

Unaffected by the finding and unchanged: the workhorse-primary Meta leg fix (meta is a direct API provider with full tool support; 1,420 successful agentic calls in the ledger) and the deepseek disabled_providers flip. Note the pre-existing antigravity-agy argon seats (argon-plan, workhorse-primary) were not added by this PR and are Drew's deliberate quota-burn arrangement from #2173/#2200; whether text-only responses are acceptable there is a separate question this PR does not change.

@dezren39
dezren39 merged commit 819889b into main Oct 30, 2026
3 checks passed
@dezren39
dezren39 deleted the fix/opencode-routes-meta-gemini branch October 30, 2026 06:44
@dezren39

Copy link
Copy Markdown
Member Author

Correction to this PR's Meta premise (verified live 2026-10-30 ~03:25 CDT, after merge):

The claim "the contributor SKU works on the same plan key (1,420 ledger successes)" was a ledger misread. The route_attempt successes under model_id muse-spark-1.3-contributor were recorded across providers — e.g. provider_id commandcode serving a catalog model of that name — not through the direct meta provider. Proven by direct test against the restarted server: meta/muse-spark-1.3-contributor with the active plan key returns the same 403 as the plain SKU: "This API key is billed to a Muse Code subscription. Muse Code subscriptions cover requests from the Muse Code client only." The plan key only works from the Muse client itself, so the direct api.meta.ai door is closed for BOTH SKUs regardless of this PR's rename (the rename is harmless; the leg will 403 and fail over like before).

The working door into the Meta plan is the muse program via muse-proxy (:19747, OAuth route): verified live with a real completion on muse-spark-1.3 at 2026-10-30 03:26 CDT. No provider in the deployed config points at :19747 today; seating one into the routes is a separate change awaiting Drew's ruling (it neighbors his standing ban on the opencode muse provider — a different mechanism than the muse program's proxy).

@dezren39

Copy link
Copy Markdown
Member Author

Update (2026-10-30 ~03:35 CDT): the seat restoration in PR #2635 supersedes this PR's Meta leg change.

#2635 removes "muse" from disabled_providers and re-seats the routes' Meta leaves through muse-proxy (provider "muse") at the exact positions/weights this PR's meta/* leaves held: spark-plan reserve leaf -> muse/muse-spark-1.3; workhorse-primary Spark leg -> muse/muse-spark-1.3 (weight 1); summit -> muse/muse-wonder-1.0#max. The direct meta door stays unseated (definition retained per the switchboard rule). The attestation finding and the reasoning are recorded in dated comments in .opencode/opencode.jsonc at the muse provider and in each touched route.

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.

1 participant