Chapter 12: Model Routing: Cheap Triage vs. Expensive Reasoning

Learning Objectives

Pre-Reading Check — Why Route

Why does routing still save large amounts of money even when the router misroutes a meaningful fraction of queries?

In the cost/quality/latency triangle, what is the core limitation of committing to a single model for all traffic?

In the three-tier model ladder, what dual role does the cheap (triage) tier typically play?

1. Why Route

Key Points

A hyper-personalized assistant answers thousands of different kinds of requests. "What's the weather?" and "Draft a legally-sound severance clause tailored to my employment history" arrive through the same text box, yet demand wildly different amounts of intelligence. Sending both to a frontier reasoning model is like dispatching a trauma surgeon to treat a paper cut: it works, but it is slow, expensive, and wasteful. A router inspects an incoming request, estimates how hard it is, and dispatches it to the appropriate model tier.

The triage nurse analogy. Walk into a busy ER and you first meet a triage nurse who, in seconds, assigns a severity level: a sprained ankle to a GP, chest pain to cardiology, a trauma to the surgical team. The nurse is cheap and fast and does not treat you — they route you. A model router is the triage nurse of your AI system.

Model tiers and capabilities

To route, you first need a menu of models arranged by capability and cost. The prices below are illustrative; what matters is the shape of the ladder.

TierIllustrative modelRoleRelative costLatencyBest for
Triage / cheapHaiku 4.5Fast first responder~1x (baseline)LowestClassification, extraction, short factual answers, formatting, the router itself
MidSonnet 5Workhorse~5–15xMediumMost conversational turns, standard tool use, summarization, drafting
Strong / reasoningOpus 4.8Specialist~40–60xHighestMulti-step reasoning, hard math/code, ambiguous or high-stakes requests, complex planning

When one model is not enough. Routing earns its complexity where a single fixed model fails: bimodal traffic (a flood of trivial requests interleaved with rare critical ones), cost pressure at scale (the 15–60x spread makes "always frontier" a budget-destroyer), and latency-sensitive surfaces (autocomplete needs sub-second responses only a small model delivers).

[Animation slot: Cost/quality/latency triangle — a draggable point sliding between the three vertices, showing how a single-model choice locks one position while routing distributes requests across the whole space.]

Key Takeaway

Post-Reading Check — Why Route

Why does routing still save large amounts of money even when the router misroutes a meaningful fraction of queries?

In the cost/quality/latency triangle, what is the core limitation of committing to a single model for all traffic?

In the three-tier model ladder, what dual role does the cheap (triage) tier typically play?

Pre-Reading Check — Routing Strategies

What is the defining weakness of rule-based (keyword) routing?

What fundamentally distinguishes a cascade from a router?

On hard requests, what is the cost tradeoff of a cascade compared to a router?

2. Routing Strategies

Key Points

Rule-based routing

The simplest router is a set of deterministic keyword rules: words like "sum," "list," "define" indicate low complexity; words like "prove," "derive," "explain why" suggest high complexity. Rules are an excellent floor — they cheaply catch obvious cases and hand everything ambiguous to a safe default — and invaluable as guardrails (e.g., "always route legal or medical content to the strong tier, regardless of the classifier").

Figure 12.1: Router decision flow — classify difficulty up front, then dispatch to a single tier.

flowchart TD A[Incoming request] --> B{"Attached files or<br/>long context?"} B -->|yes| S["Strong tier<br/>(Opus 4.8)"] B -->|no| C{"Hard-complexity<br/>cue matched?"} C -->|yes| S C -->|no| D{"Easy-complexity<br/>cue matched?"} D -->|yes| E["Cheap tier<br/>(Haiku 4.5)"] D -->|no| F["Mid tier<br/>(Sonnet 5)<br/>safe default"]

Classifier and LLM-based routing

To capture meaning beyond surface tokens, a learned router reframes routing as a classification task. Two common approaches: a lightweight ML classifier (e.g., DistilBERT trained on ~31,019 prompts from eight benchmarks) that captures semantics, or LLM-based routing where a cheap LLM judges difficulty directly. The reference framework, RouteLLM, focuses on routing between a stronger/expensive and a weaker/cheaper model, training four router types:

Router typeHow it decides
Similarity-weighted (SW) rankingWeighted Elo based on similarity between the incoming prompt and labeled examples
Matrix factorizationLearns a scoring function for model–prompt compatibility (best on MT Bench)
BERT classifierPredicts which model will produce the superior response
Causal LLM classifierA generative classifier that also predicts which model performs better

Crucially, RouteLLM routers generalize to new model pairs without retraining — you can swap in a new mid-tier model without re-collecting preference data. The one tunable knob is the cost threshold, which slides an operator along the cost-quality frontier.

Model cascades and escalation

A cascade inverts the logic: it runs the cheapest model first, checks a confidence/quality signal, and escalates to a stronger model only if the answer is not good enough. The foundational work is FrugalGPT, which reports matching the best individual model's accuracy with up to 98% cost reduction, combining Prompt Adaptation, LLM Approximation (caching), and the LLM Cascade.

Figure 12.2: Model cascade with escalation — run cheapest first, score, escalate only if needed.

flowchart TD A[Incoming request] --> B["Query cheap model<br/>(Haiku 4.5)"] B --> C{"Confidence above<br/>threshold?"} C -->|yes| R["Return answer"] C -->|no| D["Escalate to mid model<br/>(Sonnet 5)"] D --> E{"Confidence above<br/>threshold?"} E -->|yes| R E -->|no| F["Escalate to strong model<br/>(Opus 4.8)"] F --> R

Router vs. cascade — the core tradeoff. This is the single most important design decision in the chapter.

DimensionRouter (decide up front)Cascade (run, then escalate)
When decision is madeBefore any model runsAfter observing a real cheap-model answer
Information availableMust predict difficulty blindSees an actual answer to judge
Cost on easy requestsPay once (chosen model)Pay once (cheap model only)
Cost on hard requestsPay once (strong model)Pay twice — cheap plus strong
Latency on escalationNone extraAdded tail latency (waits for both)
Decision qualityOnly as good as difficulty predictionGrounded in a real, observed answer
Best whenPrediction is reliable; latency mattersCheap model is often right; a good quality signal exists
[Animation slot: Side-by-side router vs. cascade — a single request flows through each path in parallel, animating the "pay once" arrow for the router and the "pay twice + wait" double-hop for the cascade on a hard request.]

Key Takeaway

Post-Reading Check — Routing Strategies

What is the defining weakness of rule-based (keyword) routing?

What fundamentally distinguishes a cascade from a router?

On hard requests, what is the cost tradeoff of a cascade compared to a router?

Pre-Reading Check — Triage in Practice

Why does the chapter warn against shipping a hand-guessed confidence threshold for a cascade?

What happens if a cascade's escalation threshold is set too permissive (accepting low-confidence answers)?

According to the "route on the source of difficulty" heuristic, where should a request that is hard because it needs five well-defined tool calls be routed?

3. Triage in Practice

Key Points

Detecting hard requests

Consider the request: "Given my three savings accounts and last year's tax return, tell me how much I can contribute to my IRA without penalty." The rule layer finds no easy keyword and flags the attached files; the classifier layer embeds the prompt, finds it close to labeled "multi-constraint reasoning" examples, and predicts complexity = high; the decision routes to the strong tier. Contrast "What's the contribution limit for an IRA this year?" — a bare lookup the cheap tier answers instantly.

Confidence and escalation thresholds

Get the threshold wrong in either direction and you lose:

A sobering caution: most deployed routers and cascades use uncalibrated confidence scores and require per-workload tuning. Research like UCCI maps token-level margin uncertainty to a per-query error probability via isotonic regression, then picks the threshold by constrained cost minimization. The practical recipe: never ship a hand-guessed threshold — collect labeled samples of your own traffic, plot escalation and error rates against the threshold, and re-check periodically as traffic drifts.

Tool-heavy vs. reasoning-heavy

Reasoning-heavy tasks demand deep multi-step thinking within the model (proofs, hard math/code, ambiguous planning) — the classic case for the strong reasoning tier. Tool-heavy tasks are hard because they need many correct tool calls; a capable cheap model that reliably picks the right tool often beats an expensive one because the tools supply the correctness. The heuristic: route on the source of difficulty, not just its magnitude.

[Animation slot: A threshold slider sweeping from permissive to strict, with two live counters — "errors leaked" rising on the left and "over-escalation cost" rising on the right — showing the sweet spot in the middle.]

Key Takeaway

Post-Reading Check — Triage in Practice

Why does the chapter warn against shipping a hand-guessed confidence threshold for a cascade?

What happens if a cascade's escalation threshold is set too permissive (accepting low-confidence answers)?

According to the "route on the source of difficulty" heuristic, where should a request that is hard because it needs five well-defined tool calls be routed?

Pre-Reading Check — Operational Concerns

How does a fallback differ from an escalation?

What is the "signature" failure mode of a router that the chapter warns about most strongly?

Why is routing a small random fraction of all traffic unconditionally to the strong tier a useful guardrail?

4. Operational Concerns

Key Points

Fallbacks and provider outages

Escalation is about quality; a fallback is about availability — you move to an alternative model (possibly a different provider) because your intended model is unreachable. Every production router needs a fallback chain: within-provider (if Opus is rate-limited, retry Sonnet rather than error out), cross-provider (keep a comparable model from a second vendor warm), and timeout budgets per tier. The principle: degrade quality gracefully, never fail silently — and log every fallback event. FrugalGPT's caching doubles as an availability aid, serving cached responses even when a provider is down.

Measuring routing quality

You cannot manage what you do not measure, and a router is deceptively easy to think is working while it quietly degrades. Track at minimum:

Avoiding quality regressions

The most dangerous failure mode is a silent quality regression: costs look great, dashboards are green, but a segment of users now gets worse answers. Because the price spread is so forgiving, savings can mask the harm. Guardrails:

[Animation slot: A monitoring dashboard where the "cost saved" gauge climbs green while a hidden "quality retention" line quietly dips — then the control-group comparison flags the divergence, illustrating a silent regression being caught.]

Key Takeaway

Post-Reading Check — Operational Concerns

How does a fallback differ from an escalation?

What is the "signature" failure mode of a router that the chapter warns about most strongly?

Why is routing a small random fraction of all traffic unconditionally to the strong tier a useful guardrail?

Your Progress

Answer Explanations