Model Routing
Choosing which model handles which step, trading capability against cost and latency.
Model routing is the practice of directing different steps of a workflow to different models. Providers offer tiers spanning roughly an order of magnitude in price and latency, so a system that sends every step to the largest model is usually overpaying, and one that sends every step to the smallest is usually unreliable.
Routing is an architectural decision because capability differences are not uniform. Cheaper models are often perfectly good at bounded, well-specified work and specifically bad at things that need judgement across a wide space. Two failure modes recur:
Cheap models under-produce what they are merely permitted to produce. Given an output shape where a component is optional, a smaller model will systematically omit it, and no amount of instruction fixes this. Making the component required in the schema fixes it immediately, because the grammar enforces requirements and nothing else. See Constrained Decoding.
Cheap models have tighter structural ceilings. A schema that compiles for a large model may be rejected or time out for a small one, so the tightest-routed model is the one to probe against.
Routing also interacts with testing: an environment configured for a cheap tier will produce different results from production, and a verification that never reached the interesting comparison because it bailed on a model-identity check has proved nothing.
See also4
Hand-picked in the note itself — the neighbours worth reading next.
Large Language Model
A neural network trained to predict text, used as a general-purpose instruction-following system.
Agents & Language Models22 connections
Token Budget
The finite allowance of model usage a task may consume, and the design decisions it forces.
Agents & Language Models11 connections
Structured Output
Constraining a model to emit data conforming to a declared schema rather than free text.
Agents & Language Models11 connections
Evaluation Harness
A repeatable test suite for model behaviour, since prompts and tool descriptions cannot be type-checked.
Agents & Language Models11 connections
Related4
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from5
Notes elsewhere in the wiki that reach for this one.
- Constrained DecodingAgents & Language Models
Restricting a model's next-token choices to those a formal grammar permits.
- JSON SchemaAgents & Language Models
A vocabulary for describing the shape of JSON data, and the lingua franca of model tool interfaces.
- Large Language ModelAgents & Language Models
A neural network trained to predict text, used as a general-purpose instruction-following system.
- Structured OutputAgents & Language Models
Constraining a model to emit data conforming to a declared schema rather than free text.
- Token BudgetAgents & Language Models
The finite allowance of model usage a task may consume, and the design decisions it forces.