
Smart Model Routing: How to Cut LLM Costs Without Sacrificing Quality
Sending every request to your most capable model is the easy default and the expensive one. Model routing matches each request to the cheapest model that can handle it, often cutting cost by 10x.
Most teams ship their first LLM feature the same way: pick the most capable model available, wire it up, done. It works, and it's the fastest way to ship. The problem shows up later, in the invoice — every request pays the price of your most expensive model, whether it needed that much capability or not.
Model routing fixes this by asking a different question before every request: what's the cheapest model that can still get this right?
Why unrouted LLM usage gets expensive
LLM providers bill by tokens processed, and larger models cost more per token because they carry more parameters and more computation per request. That premium buys real capability — but only tasks that need it benefit from paying for it.
Picture a product-feedback triage feature handling 500,000 requests a month. Some of those requests are "is this ticket about billing or shipping" — trivial classification. Others are "read these five related tickets and explain whether they describe the same underlying bug" — real reasoning. If every request goes to the same top-tier model, you're paying reasoning-model prices for classification work. That's the waste routing exists to remove.
What model routing actually is
A router sits between your application and your fleet of models. Instead of your code calling one model directly, it hands the request to the router, which evaluates what the request needs and forwards it to the cheapest model capable of handling it — with an escalation path to something stronger if that guess turns out wrong.
A router sits between the request and the models
It picks the cheapest tier that can still answer correctly, then validates before returning.
"Classify this support ticket as billing, technical, or account-related."
Classification, extraction, formatting, direct rewriting.
This is not the same thing as a mixture-of-experts model. MoE routing happens inside one model, between its internal parameter groups, invisible to the caller. Application-level model routing happens outside every model, deciding which whole model gets the request in the first place.
The math behind the savings
Say your most capable model costs $0.03 per average request, and a mid-tier model costs a fifth of that, and a small model costs a twentieth of that. Now suppose you study your actual traffic and find 80% of requests are simple enough for the small model, 15% need the mid-tier model, and only 5% genuinely require the top-tier model.
Blended cost per request becomes:
(0.80 × 0.0015) + (0.15 × 0.006) + (0.05 × 0.03) = 0.0033
That's about 11% of what you'd pay sending every request to the top-tier model — roughly a 9x reduction, without touching the 5% of requests that genuinely need full capability. The savings scale with how lopsided your traffic actually is: the more your workload skews toward simple, mechanical tasks, the bigger the win.
How a router judges difficulty before answering
The hard part isn't the math — it's estimating how hard a request is before you've answered it. Request length is a bad proxy: "Is this contract enforceable?" is four words and needs serious reasoning; a 2,000-word document with "list every email address in this text" is long but mechanically simple.
A reliable router weighs several signals together instead of trusting any single one.
No single signal tells a router how hard a request is
A short request can still need a powerful model - a good router weighs several signals together.
Extraction, classification, and rewriting usually need less reasoning than planning or debugging.
Weigh together
Task type, context size, output rules, capabilities - together they point to the lowest-cost tier that satisfies all of them.
Hard override: risk
Medical, legal, financial, or security-adjacent - skip the weighing, escalate straight to a stronger tier.
Lowest-cost tier that satisfies every signal above, or escalate on any hard override.
Two of those signals deserve a callout. Risk should never be overridden by a router's own judgment — a request touching medical, legal, financial, or security-sensitive territory should route to a stronger model even when every other signal says it's simple, because the cost of a wrong answer there is asymmetric. And required capabilities — vision, tool access, a long context window — can eliminate the cheapest tier outright, independent of how "hard" the reasoning is.
Three ways to build the router itself
A small model as classifier. The most flexible approach: a cheap, fast model reads the request and returns a structured verdict — difficulty tier, risk flag, and a one-line reason — before the real request goes anywhere. It's usually combined with hard-coded overrides for anything risk-sensitive, since a classifier can misjudge and language models can be nudged by adversarial phrasing in the request itself.
Cascading. Instead of predicting difficulty upfront, try the cheap model first and check the result. If the output passes an automated check — valid JSON, all required fields present, tests pass for generated code — you keep it. If it fails, escalate to a stronger model. This works well when "good enough" is mechanically checkable; it works poorly when quality is subjective, since checking quality then requires its own model call, which eats into the savings.
Semantic routing. Convert the request into an embedding and compare it against known categories by meaning rather than keywords, so "why was I charged twice" and "there's a duplicate charge on my card" land in the same billing route even though they share no words. This is strong at identifying what kind of request it is, but weak at estimating how hard it is — a billing request can still be a one-line lookup or a multi-document dispute — so teams typically pair semantic routing with a separate difficulty signal.
Some teams eventually train a dedicated router on logged outcomes — which tier actually succeeded on which past requests — once they have enough production traffic to make that data reliable. That's a natural next step after the three approaches above, not a replacement for understanding them first.
Where routing goes wrong
Under-routing sends a genuinely hard request to a model that can't handle it, producing a confidently wrong answer instead of a correct one. Over-routing does the opposite — sending easy work to an expensive model "just to be safe" — and quietly erases the savings the whole system exists to capture.
Routers are also an attack surface: if routing logic reads instructions embedded in the user's own message, a request can talk its way into a cheaper, less-scrutinized path. Routing decisions should come from trusted application context and validated metadata, never from text the router is currently trying to classify.
Finally, routing logic decays. Model pricing changes, model quality improves or regresses, and traffic patterns shift — a routing policy tuned against last quarter's models and last quarter's traffic can quietly become wrong. Treat it as something to revisit, not something to set once.
The shape of a working router
Strip away the specific technique and a model router has exactly three jobs: estimate what the request needs, pick the cheapest model likely to satisfy that need, and validate the result well enough to catch — and escalate — the cases where the cheap guess was wrong. Get those three right, and routing becomes one of the highest-leverage cost levers available in an LLM-based product, without asking users to accept worse answers.
Go deeper in the course
This article covers the concept - the course lesson below covers the decision framework you'd actually apply on the job.
Learn in Lesson 14 - AI PM