LLM Smart Routing: frontier intelligence only when you need it

Most companies pick one model and send it everything. It's usually the best one they can afford, because nobody wants to explain why the chatbot got something wrong. So a request to reformat a table and a request to plan a database migration go to the same model, at the same price.
That made sense when there was one good model. It doesn't now. Every major vendor sells a ladder of models, and the steps on that ladder are far apart in price, much less so in quality for everyday work.
Smart routing in the LayerX AI Gateway is built on a simple idea: look at how hard each request is, then send it to the cheapest model that can handle it.
The price ladder is steep
Anthropic sells four tiers today: Haiku, Sonnet, Opus and Fable. OpenAI does the same with its Sol, Terra, Luna and Astra GPT tiers. Here is what one ordinary request costs on each Claude tier: 2,000 tokens in and 500 tokens out.

The model at the top costs 80 times what the model at the bottom costs, for the same request. Even Sonnet, the middle step most teams treat as "the sensible default", costs 20 times more than Haiku.
That gap would be worth paying if every request needed the top model. Most don't.
Frontier intelligence is the exception, not the rule
Look at what a company actually sends to an LLM in a day: summarise this ticket, pull the fields out of this invoice, rewrite this email so it sounds friendlier, answer this question from the handbook, turn this list into JSON. These are real tasks with real value, and a small model does them well.
The hard requests exist too: debugging a race condition, a multi-step agent working alone for an hour, a legal analysis where a wrong answer is expensive. They're the minority. In a typical workload they're 10 to 20% of traffic. The other 80 to 90% is cheap to get right.
The market is showing the same thing from another direction. In The AGI race has two scoreboards we looked at capability and cost side by side:

The best open-weight model sits 3.6 points behind the best closed one on the Artificial Analysis Intelligence Index, while a near-frontier open-weight model runs about 50 times cheaper per task. Developers noticed: open-weight models went from under 2% to more than 45% of tokens on OpenRouter.
The frontier is a few points ahead, and you pay for those points on every token you send, including the tokens that never needed them.
So the useful question isn't "which model is best?". It's "what does a wrong answer cost me on this request?" Your model choice becomes a routing policy.
Use the hierarchy the vendors already built
Anthropic and OpenAI didn't build model families by accident. Haiku and the GPT mini tiers exist for volume. Sonnet and the mid tiers handle everyday reasoning and coding. Opus, Fable and the GPT flagships are for the hard, high-stakes work.
The vendors built the ladder, but nothing in your stack picks the step. A developer hard-codes a model name, and that name stays until someone changes it. Usually that's the most capable model, chosen once and never revisited.
Smart routing makes that choice per request, automatically.
How smart routing works
When an application calls the gateway with model: "auto" (or no model at all), the gateway decides which model should answer. Applications use the standard OpenAI SDK and change nothing but the base URL.

1. It reads what the request needs. If the request carries tools, images, audio, files or a JSON schema, only models that support those features qualify. A request that won't fit a model's context window doesn't go to that model either. This happens before any text leaves the gateway.
2. It keeps conversations on one model. A chat shouldn't switch model halfway through and change tone or forget its reasoning style. The first routed turn pins the conversation to a model, and later turns reuse it. The pin is a keyed digest of the opening message, never the message itself.
3. A decision model scores the complexity. This is the part that makes routing affordable. Instead of asking a large LLM "how hard is this?", which would cost almost as much as answering it, the gateway asks a decision model. Decision models are a new class of model that answer typed questions with probabilities instead of writing text. They return in milliseconds, output tokens are free, and they cost a fraction of a cent per decision. The gateway asks one question, simple, medium or complex, and gets back a tier and a confidence. The decision model sees the user's requests and short signals such as how many tools are attached. It never sees assistant replies, tool results or media.
4. It picks from the tier your admin ranked. Each tier holds an ordered list of models chosen by your team. Simple might be Claude Haiku 5.5 or an open-weight model on your own GPUs. Medium might be Sonnet 5.5. Complex might be Opus 5.5 or Fable 5.2. The gateway takes the first model in the tier that qualifies and is healthy.
When it's unsure, it plays safe. If the decision model times out, fails, or answers with low confidence, the request goes to the default model your admin set, so a routing problem never becomes an outage. Every response carries an X-Routed-Model header, so you always know which model answered.
What it does to the bill
Take a team sending one million requests a month, each about 2,000 tokens in and 500 out. Today everything goes to Opus 5.5. With smart routing, the decision model finds that 60% of requests are simple, 30% are medium and 10% need the top tier.

| Requests | Model | Monthly cost | |
|---|---|---|---|
| Simple | 600,000 | Haiku 5.5 | $270 |
| Medium | 300,000 | Sonnet 5.5 | $2,700 |
| Complex | 100,000 | Opus 5.5 | $1,800 |
| Routing decisions | 1,000,000 | Decision model | $135 |
| Total with smart routing | $4,905 | ||
| Everything on Opus 5.5 | 1,000,000 | Opus 5.5 | $18,000 |
The bill drops from $18,000 to $4,905, a 73% saving. The routing itself costs $135, under 3% of the new bill. Notice where the money goes now: 60% of the requests account for under 6% of the spend, and the complex 10% still gets Opus.
Two honest caveats. This is an illustration with list prices, not a benchmark, and your own mix decides your savings. And the right metric is cost per completed task, not price per token: a cheap model that needs three tries isn't cheap. That's why the tiers are yours to set. Put a model in a tier only after it passes an eval built from your own workload.
Why do it in the gateway
You could write this logic into each application. In practice that means every team builds its own router, with its own model list, its own fallbacks and no shared view of cost. Doing it in the gateway gives you:
- One policy for the whole company. Admins choose the models in each tier, and the change reaches every application at once, with no redeploy.
- Every choice stays temporary. In 2026 the "best model" has had a half-life of about six weeks. When a better or cheaper model ships, you move it into a tier and every app benefits the same day.
- Open-weight and closed side by side. The simple tier can point at a model on your own GPUs, so the high-volume traffic and the sensitive data stay in your network, while the hard 10% still reaches a frontier API.
- Cost you can see. The gateway records usage and cost per user, key, model and provider, so you can check that routing is saving what it should.
- Privacy by default. The gateway never logs or stores prompts and responses. The routing decision is logged with model names and counts only, never with text.
Start with the question that matters
Frontier models are remarkable, and some of your work needs them. Most of it doesn't. The companies that keep their AI bill under control won't be the ones that found the single best model. They'll be the ones that send each request to the cheapest model that can answer it well, and keep that decision in one place.
Smart routing is opt-in: an admin switches it on in the LayerX AI Gateway portal, picks the models for each tier, and applications start sending model: "auto". Requests that name a model are untouched.
If you want to see what it would do to your own bill, talk to us.
Prices are Anthropic first-party list prices as of November 2026. Decision-model pricing is the Cloudflare Clef-flash list price. Capability and usage figures are from the Artificial Analysis Intelligence Index v4.1.1 (August 2026) and OpenRouter, via The AGI race has two scoreboards.