Kelly Mears

Model Routing

Choosing which model handles which step, trading capability against cost and latency.

Agents & Language Models2 min read216 words11 out · 7 in
also calledModel tieringModel selection

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 judgment 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 also10

Token Budget

The finite allowance of model usage a task may consume, and the design decisions it forces.

Agents & Language Models20 connections

Structured Output

Constraining a model to emit data conforming to a declared schema rather than free text.

Agents & Language Models13 connections

Evaluation Harness

A repeatable test suite for model behavior, since prompts and tool descriptions cannot be type-checked.

Agents & Language Models18 connections

Prompt Engineering

Shaping a model's input to make the desired behavior reliable rather than occasional.

Agents & Language Models22 connections

Nondeterminism

The property that identical inputs may produce different outputs, and what it costs to test around.

Agents & Language Models24 connections

JSON Schema

A vocabulary for describing the shape of JSON data, and the lingua franca of model tool interfaces.

Agents & Language Models14 connections

Large Language Model

A neural network trained to predict text, used as a general-purpose instruction-following system.

Agents & Language Models38 connections

Token

The sub-word unit a language model actually reads and writes; the unit of cost and of context.

Agents & Language Models22 connections

Mixture of Experts

A model architecture that holds many parameter blocks but runs only a few per token, decoupling total size from per-token compute.

Agents & Language Models7 connections

Reasoning Model

Language models trained to think at length before answering, trading tokens and latency for accuracy on hard problems, and the second axis of scaling after model size.

Agents & Language Models7 connections

Linked from7