How Cursor Router chooses the right model for the task · Cursor
Cursor Router picks a model per agent turn in two stages: Compass, a complexity predictor trained on implicit user-satisfaction signals (moving on vs. correcting the agent), decides whether a turn stays on a cheap model (Grok) or gets upgraded. Upgraded turns are classified by a learned taxonomy of domains, tasks and modifiers and sent to the frontier model with the best observed performance there. A candidate must clear a one-sided 75% confidence uplift over the cheap model, and an optimizer picks the traffic-weighted model mix that maximizes expected gain within each mode's per-turn cost budget. Policies were tuned with cross-validation, checked on a held-out set, then validated on live traffic. Auto Intelligence now beats Fable-level satisfaction at 68% lower cost, and Auto Balance beats Opus 4.8 at 41% lower cost.
Related posts
- Model Routing Is Simple. Until It Isn’t.
Hugging Face easyNoviceLLM model routing in agentic systems is a systems optimization problem, not a classification one. On 417 AppWorld tasks with a CodeAct agent, Claude Sonnet 4.6 cost $0.19/task versus GPT-4.1's $0.37 despite higher list prices and about 3x more steps, because cheap cache reads dominate agent workloads. Task difficulty is often invisible at routing time and competes with latency, compliance and reliability constraints, and latency depends on serving conditions and routing granularity. IBM's optimization-based router traces a cost-accuracy frontier: one configuration reached 84% accuracy with 21% lower cost and 9% lower latency than Opus alone, at about 6 ms and 2 kB overhead per task.
- How to Build a Model Router in the Harness
LangChain mediumAdeptRouting each coding-agent thread to one of three model tiers (fast, balanced, performance) cut median cost per thread by 64% versus always using a top frontier model, with no measurable change in merged-PR rate (29.2% vs 27.3%, p=0.49) across 973 threads in Open SWE. The router runs as harness middleware, classifying the first user message against per-tier criteria. Those criteria come from trace-based task analysis and provider guidance, which is why it belongs in the harness rather than a generic gateway. Most threads went to the balanced (56%) or fast (34%) tiers. A fast-only control degraded quality so quickly it was stopped within a day. Future work includes subagent routing and mid-thread re-routing, which carries a prompt-cache cost.
- The Open Source AI Stack
Together AI easyNoviceAdopting open models for agentic coding is framed as a five-layer "MIGHT" stack: model, inference provider, gateways/routers, harness and tools (skills and MCP), with each layer swappable independently so new models can be tried in minutes. Large MoE models like Kimi K3 suit ambiguous multi-step work such as refactors and debugging, while small models like GLM 5.3 Flash are roughly 20x cheaper and match them on tightly scoped tasks. Gateways such as OpenRouter, Vercel AI Gateway and LiteLLM route across providers, and harnesses like OpenCode or Amp execute the tool calls the model requests. The practical advice is to treat model choice as tool selection and to start fresh sessions often to keep context clean.
- Mubit + Neon AI Gateway: an agent that cuts its own frontier-model tokens by 73%
Neon mediumAdept
Mubit, a proxy placed in front of Neon AI Gateway, records an agent's model calls, groups recurring calls into tasks, and fine-tunes a small open-weight model once a task has at least 25 good replies. The tuned model must pass a held-out exam, then moves through shadow, canary and promotion stages, and is demoted if sampled quality drops. It also stores verified lessons tied to schema versions. On 20 CL-bench questions run against a Postgres analyst agent, gpt-5.5 input tokens fell 73% (21.7k to 5.9k per question) and latency fell 40% with roughly equal accuracy. SQL generation stayed on the frontier model because the small model matched only 8-10% of the time, and lessons doubled correct runs after a schema change. The template runs on Neon Functions with an outbox-style lesson queue and uses Neon branches to test before and after a migration.
- Open Models have crossed a threshold
LangChain mediumAdeptOpen-weight models GLM-5 and MiniMax M2.7 now score close to closed frontier models on core agent tasks in LangChain's Deep Agents eval suite. GLM-5 reached 0.64 correctness, MiniMax M2.7 0.57, and Claude Opus 4.6 0.68, across 138 tests covering file ops, tool use, retrieval, memory and summarization. The open models are far cheaper and faster: about $12/day versus $250/day for 10M output tokens, and 0.65s versus 2.56s latency. The eval metrics are defined (correctness, solve rate, step and tool-call ratios), and switching Deep Agents to an open model is a one-line change, with the harness adapting context management and model identity to each model.