Model Routing

Automatically directing each task to the cheapest model capable of handling it — an emerging table-stakes layer for controlling AI spend.

Also known as: smart routing, smart model routing, intelligent router / smart model routing, AI gateway, escalation, model routing

How authors use it

Oldest first (extraction date when no publication date is known).

AuthorTheir termTheir meaning
Guest post: AI Inference Is Breaking Unit Economics
Turing Post · 2026-05-07
smart routingDirecting simple queries to smaller/cheaper models and reserving larger models for harder tasks, reducing average cost per query
GitHub - Doorman11991/smallcode: AI coding agent optimized for small LLMs. 87% benchmark with 4B-active model.
https://github.com/Doorman11991/ · 2026-05-21
escalationOpt-in fallback from local model to a cloud model (Claude/OpenAI/DeepSeek) on hard failure, session-limited to prevent runaway costs
The Pulse: a new trend, smart model routing
The Pragmatic Engineer (Gergely Orosz) · 2026-07-03
intelligent router / smart model routingA layer or tool that automatically selects the right (typically cheapest-capable) LLM for each task, prompt, or session in order to optimize cost while preserving output quality
The Pulse: a new trend, smart model routing
The Pragmatic Engineer (Gergely Orosz) · 2026-07-03
AI gatewayA proxy layer through which a workplace funnels its LLM API calls; increasingly ships with routing that can pick models by cost, latency, and availability
GitHub - musistudio/claude-code-router: Use Claude Code as the foundation for coding infrastructure, allowing you to decide how to interact with the model while enjoying updates from Anthropic.
musistudio · 2026-07-11
Model RoutingDirecting each request to a different model based on the kind of task — background, reasoning, or long context — rather than sending everything to one model.
An Evolutionary Architecture Pattern for Managing AI's Pace of Change
Joe Price, Branimir Đurek, Pavlos Migkiros, Trevor Dearham · 2026-07-27
AI gatewayA single control plane — an architectural seam — that concentrates the fastest-changing concerns of agentic AI systems (model routing, agent identity, action policy, segmentation, content guarding, and audit) so the rest of the enterprise architecture can stay stable while that layer evolves at its own pace.

Documents (22)

Propositions touching this concept (11)

By publication month, oldest first (extraction month when no publication date is known).

2026-05

2026-07

Tensions

Is the model a swappable, commoditized component (so selection is a cost decision), or is model choice load-bearing (so selection is a capability decision)?
from: When working with AI coding agents, how should you select the model, its reasoning/effort level, and its context size for a given task?
Assessment: Both camps are right about different task strata, and the tie is broken by the routing camp's own artifact. Commoditization holds on the bulk/background tier (musistudio and the Pragmatic Engineer are correct that a cheap or open model suffices for a large share of tokens), but model choice is load-bearing exactly on the hard tier — the 'hardest 40%' the routing camp routes AWAY (the Pragmatic Engineer's own gap notes 60%-of-token-spend is not 60%-of-value). nrehiew's 6.5x over-editing spread and stellaraccident's collapse are measured on precisely that hard tier. The clincher the swap camp does not concede: musistudio's OWN per-model transformers (tooluse, enhancetool, reasoning, deepseek, gemini) prove the harness is NOT model-agnostic — every model needs bespoke request/response rewriting just to work behind Claude Code, so the 'any model' artifact self-refutes. Delangue even concedes the frontier gap himself. Verdict: select cheap-and-swappable for bulk, and treat the model as a load-bearing capability decision for the hardest slice — the two positions are not competitors but a partition of the task distribution.
Context size: should you shrink the problem to fit a small usable window (decompose / reset), or grow and trust a large window?
from: When working with AI coding agents, how should you select the model, its reasoning/effort level, and its context size for a given task?
Assessment: The apparent 'grow / trust the big window' position for CODING largely dissolves once retrieval is separated from coding — which is exactly Pocock's move ('good for retrieval, less good for coding') and musistudio's (longContext is a routed escalation, not the coding default). No text argues you should code inside a full 1M window. The only genuine pressure toward trusting a bigger window is the vendor-forward Fable 5 / Opus 4.6 claim that coherence loss is being engineered away — but that is a moving target (convergence 5), not a stable dial, and even the harness paper only relaxed context resets AFTER measuring that the new model no longer needed them. A secondary, live sub-dispute survives: reset vs compact. Pocock, the harness paper and best-practices favor clearing/resetting to a fresh agent; Hills and Osmani lean on compaction. The reset camp has the better argument on today's models — compaction preserves the same anxious agent — but the disagreement is real and unresolved. Verdict: shrink-and-decompose is the default for coding; grow only as an explicit retrieval escalation; prefer reset over compact unless the model version has demonstrably killed context anxiety.
Who selects the model/effort/context — a human deciding per task, or an automatic router — and who is trusted to hold the dial?
from: When working with AI coding agents, how should you select the model, its reasoning/effort level, and its context size for a given task?
Assessment: The human-vs-auto axis is less about capability than about (a) whether task difficulty can be detected a priori and (b) who bears the principal-agent risk. No router in the corpus actually measures difficulty — musistudio routes by token-count and static scenario, and the Pragmatic Engineer's routers infer 'good enough' without a demonstrated oracle — so 'auto' today means 'static-heuristic', not 'optimal'. Automation is safe when the user owns the policy (musistudio) and dangerous when the router profits from the choice (Cursor Auto) or when the provider adjusts the dial invisibly (stellaraccident). Verdict: keep the human holding the difficulty judgment and the effort dial until routers can both measure adequacy and prove neutral incentives; automate only the mechanical dispatch, over rules you own and can audit.

Open gaps (52)