Repository navigation
Closed
Labels
plan:donePlanboard status
Description
Research findings (thread e4551617). There is no routing layer today: every provider/model decision is user pick, inheritance, lead-LLM alias pick, or registry-order contrast. The building blocks for a real router mostly exist.
Highest value
- Settings-level default provider/model.
createThreadhard-codesprovider: "claude"(services.js:542); the renderer patches from the selected thread, but autodispatch (autodispatch.js:21-25) and issue-created threads always get claude. Fix:settings.defaultProvider/default model, thread through createThread. - Cross-provider failover on quota exhaustion.
quotaWait.jsparks the same thread on the same provider; exhausted balance hard-fails; the header comment itself references "model failover (Automatic model failover mid-run #294)" as not-present. The two hard parts are already solved:setProviderclears sessionId for portability (services.js:1205) andsnapPermissionMode(providers.js:110) handles mode portability. A per-thread ordered fallback chain on quota-fail is feasible with existing seams (runner.js:2381 markRunFailed). - Filter worker pool by availability + re-route on start failure. The lead picks pool aliases by free-text description;
resolveSubagentPoolnever checks the binary exists — failure only surfaces atassertProviderBinary(runner.js:465), anddispatchOrchCommandsilently drops the failed worker (runner.js:5509-5519). Cheap wins: filterformatPoolMenubyisBinAvailable; re-route a start failure to the next pool entry.
Medium
- Join fleet evidence back into routing. Real per-run cost/outcome data is collected (
fleet.js:419-424,usageByThread) but only feeds a report view. A cost-per-success-per-provider/model table per project would letfillProviders(orchcommands.js:108-126, currently registry-order contrast only) and pool auto-pick route on evidence instead of order. - Context-pressure model escalation.
modelInfo.contextTokensmetadata and the live context ring signal are both in-process; nothing escalates to a 1M-window model when a thread outgrows its window. Natural first automatic router. - Capability flag for interactivity. Only claude has the blocking permission channel; question cards die to machine turns on other CLIs (Question cards are erased by machine-delivered turns (grok/kimi hit it every time) #687). Any auto-router must weight "can prompt the user" (derivable from
permissionModes) for interactive threads vs unattended workers — otherwise routing silently downgrades interactivity.
Low / noted
- Cursor's ~200-model list is hand-copied (providers.js:611-816), stale by construction.
- Generic provider (
CODER_AGENT_CMD) bypasses the whole registry contract — relevant if arbitrary CLIs become route targets.
Files to touch: electron/providers.js (capability metadata), electron/services.js:542 (default), electron/quotaWait.js + runner.js:2381 (failover seam), electron/subagentPool.js (availability, auto-pick), electron/fleet.js/src/fleet.ts (evidence loop).
Metadata
Metadata
Assignees
Labels
plan:donePlanboard status
Activity
currentbits commentedon Aug 27, 2026
Shipped the three highest-value items on this issue:
settings.defaultProvider/defaultModel.createThreaduses them (so autodispatch and issue-created threads no longer hard-code Claude). The renderer still inherits from the selected thread when there is one.settings.quotaFailover(ordered provider ids). On a quota-like error, the thread switches to the next unused id in the chain and replays the same prompt. Empty chain preserves today's park-or-fail behaviour.formatPoolMenuhides candidates whose CLI is not installed. A worker that fails with "Provider binary not found" retries the next pool entry.Not in this pass (still open on the issue): fleet evidence routing, context-pressure escalation, interactivity capability weighting, Cursor catalogue freshness, generic-provider contract.
Settings UI: Threads pane.
currentbits commentedon Aug 27, 2026
Landed from Solenta thread "Fork: Model routing: settings default, quota failover chain,". Closed on merge.