What
Rebuilds experimental.model_routes in .opencode/opencode.jsonc as composable pools and repoints the named agents at them. Built on top of #904's reconciled config; #904 merged while this was in flight (merge commit 52b02e0), so origin/main has been merged in and the config re-validated after the merge (validator: no problems; the env-template proxy-port change from #904 is unaffected).
Design record: doc/2026-10-25T21-11-31Z_design_route-pools/ — names, membership, effort settings, strategy semantics, and what was verified in the fork vs. changed (nothing in the fork needed changing).
The pools
Per-model pools (plan providers only, round-robin): deepseek-flash-plan, deepseek-pro-plan, haiku-plan, luna-plan, glm-flash-plan, gemini-flash-plan, sonnet-plan, opus-plan, sol-plan.
deepseek-flash = ordered composition: deepseek-flash-plan first (weight 100, so quota demotion of plan leaves can never promote the reserve), then deepseek/deepseek-chat — the PAYG DeepSeek provider as reserve only, reached when no plan leaf is ready. Drew's specified composition.
- Tier pools nest the per-model pools as single items, effort as the variant on the reference:
scout (routine: Flash#medium, GLM Flash#medium, Haiku), workhorse (standard: Flash#high, Luna#max, Haiku#high, Meta Spark), specialist (hard, ordered: Sonnet#high, Luna#max, Sol#medium, DS Pro#high), summit (very complex only: Opus#high, Sol#high, Muse Wonder).
Agents: classifier → scout, classifier-complex → workhorse, coder → workhorse, reasoner → specialist. Hard pins removed, so one provider's quota wall no longer strands an agent.
Removed route ids: cheap-pool, fast, balanced, deep, free (they targeted disabled providers; fast/balanced also used PAYG DeepSeek routinely). Nothing in the repo references them; sessions pinned to opencode-route/fast etc. need re-pinning at deploy time.
Deliberate membership exclusions, per the provider-quota registry: commandcode (its plan has no API access — joins by config edit when upgraded) and openai.alternate (no credential in the store yet). antigravity-ls is included: the scratch server lists it enabled under this config, superseding the registry's 2026-10-24 disable note (flagged in the design record).
Why no fork or OpenChamber PR
Verified in developing-today/opencode source: nested routes already work for selection (lazy recursive walk in model-route.ts, RR/weights compositional); the demote-one-target ask is already expressed by weights (round-robin is smooth weighted RR; weights rank in every mode; unset = 1) plus automatic quota demotion (×0.01) — a new demote field would duplicate it and be refused by OpenChamber's validator as an unknown key. OpenChamber's validateModelRoutes was run against this exact route set: no problems.
Verified
- Config parses; OpenChamber validator: no problems.
- Scratch
opencode serve (port 4199, scratch XDG homes; live server and deployed config untouched), worktree as location: /api/config resolves all 14 routes with variants carried; all 18 disabled providers appear as provider.use deny policies; /api/provider resolves the enabled set incl. opencode-route and antigravity-ls; the four agents resolve to their pools; opencode-go.lab resolves as an opencode-go instance.
- Not verified: live leaf-level model calls (scratch home holds no credentials).
Merge note
#904 has merged, and this branch has merged current main in, so this PR is ready to land as soon as its checks are green.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Need help on this PR? Tag @codesmith-bot with what you need.