Discuss your project

Guide

Model routing: the cheapest model that still works

Model routing by task, not by habit: a routing table, two deadlines, a fallback chain that ends in an alert, and a circuit breaker that stops a bad tier.

By · Updated · 5 min read

Model routing is the decision of which model handles which request. It is the second-largest cost lever after caching, and it is the one most often made by habit.

A team picks a favorite model, uses it for everything, and pays frontier prices for classification. Or it picks the cheapest model, uses it for everything, and pays in rework. Routing is how you stop doing either.

Discuss your project

The routing table

Start with the task, not the model.

TaskTierWhy
Classification, tagging, intent detectionSmallA narrow answer space
Field extraction from a known formatSmall to midPattern matching with a schema
Summarization of a known documentMidReading and compression
Drafting from a templateMidHuman review catches the rest
Multi-document analysisFrontierLong-range reasoning
Architecture and ambiguous synthesisFrontierStakes and ambiguity
Code changes on a known codebaseCode-specialistTool use and syntax

The table is a starting point. The real table comes from your evaluation set: run each task on two tiers and keep the cheaper one that passes.

The fallback chain

A routing table needs a failure path.

primary (cheap) -> fallback (mid) -> strategy (frontier) -> alert

Four rules make the chain safe:

The router owns escalation. The small model never decides to promote itself. A timeout, a transport failure, or a low-confidence output returns control to the router, which chooses the next tier.

Each tier has a reason to fail. A rate limit, a context overflow, a timeout, or a quality check. The router logs which one.

The chain ends in an alert, never a silent failure. A request that no tier can serve goes to a person, not into a void.

The fallback respects the data boundary. A sensitive request must not fall back to a hosted model. The route is blocked by data class, not just by availability.

Two deadlines, not one

A single timeout cannot express two different problems: a call that is slow but will finish, and a call that is stuck.

I use two deadlines on the local tier:

  • A soft deadline of 10 seconds flags the call as slow while it finishes.
  • A hard deadline of 20 seconds abandons it and records a failure.

The soft deadline produces a warning and a log entry. The hard deadline triggers the fallback. That distinction is what lets you tune the system without guessing.

The circuit breaker

Repeated failures in a short window should disable a tier for a while, not re-probe it on every request.

A circuit breaker with a long cool-off does three things:

  • It stops a broken tier from adding latency to every call.
  • It gives the operator time to notice.
  • It prevents a retry storm from turning a small outage into a large bill.

Set the threshold from your traffic, not from a template. A tier that fails five times in a minute on a busy system is a different signal from one that fails five times in a day on a quiet one.

Log every route

A route log with four fields is enough to start:

  • The task class.
  • The model that served it.
  • The latency.
  • The outcome, including whether a fallback was used.

With that log you can answer the questions that matter: which task class is expensive, which tier is unreliable, and which fallback is doing the real work.

Without it, routing is a set of guesses that feel like a strategy.

A real chain

My own production stack, as of the August 2026 build:

  • Primary: DeepSeek V4 Pro for routine work.
  • Fallback: Claude Sonnet 4 when DeepSeek degrades.
  • Strategy: Claude Opus 4 for architecture and complex synthesis.
  • Delegation: the same chain, with the primary model as the default for subagents.
  • Excluded: Haiku, by policy on this stack.

The specific names will age. The shape is the point: a cheap default, a reliable fallback, a frontier tier for the work that needs it, and a policy that excludes a tier for quality reasons.

Where routing fails

The routing decision is invisible. Nobody knows which model served a request, so nobody can improve it.

The cheap tier is too weak. The fallback rate climbs above 10 percent, and the "saving" is paid back in retries.

The frontier tier is the default. Everything routes to the best model, and the table is decoration.

The fallback is silent. A hosted model serves a request that should have stayed local, and the boundary is gone.

The table is never revisited. Model prices and quality change monthly. A routing table that is a year old is a guess.

How to start

  1. Pick the three highest-volume task classes.
  2. Run each on the current model and one cheaper tier.
  3. Compare cost per successful task, not cost per token.
  4. Route the ones that pass to the cheaper tier.
  5. Add the fallback and the log.
  6. Review monthly.

Three task classes are enough to prove the pattern. Expand after the numbers hold.

Sources and what they change

Two references for the design, not the model names.

  • Anthropic, building effective agents. Workflows and agents are different. A router is a workflow decision, and it should be deterministic where it can be.
  • 12-Factor Agents. Factor 8 is own your control flow. A router that hides its decisions inside a framework cannot be inspected, priced, or debugged.

Questions owners ask

Three tiers is enough for most companies: cheap, capable, frontier. More tiers add complexity without a proportional saving.

Yes, with a classifier or a rule set based on the task signature. The classifier itself costs tokens, so cache common classifications.

The router escalates on a failed quality check. The check has to exist, or the wrong answer ships.

A cheap model is usually faster. The fallback adds latency only when it fires. The soft deadline is what keeps a slow primary from holding the request.

Monthly, and after any model release or price change. The table is a living document.

Start with the process that costs you the most time

Tell me which process you want to improve. A name, an email, and a short description of the process are enough to start a useful conversation.

Discuss your project