The practical, first-principles guide to spending less on AI agents by sending each request to the cheapest model that can actually handle it.
Anthropic measured that its own multi-agent system burns roughly 15 times the tokens of a normal chat, and that token usage alone explains about 80% of the variance in agent quality - Anthropic Engineering. Read that twice. The thing that makes an agent good (spending tokens to think, search, and retry) is the same thing that makes it expensive. You are not buying software anymore. You are buying inference by the token, and an agent is a machine designed to consume as much of it as the task will bear.
That is why the bills look the way they do. Enterprise spend on large language model APIs reached $8.4 billion in the first half of 2025, more than double the $3.5 billion of the prior half year, even as the price of any single token kept falling - Menlo Ventures. Per-token prices collapse, total spend explodes, and the reason is agents: loops, long context, parallel sub-agents, and retries that quietly re-bill you for work you already paid for.
But here is the structural mistake almost everyone makes: they pick one model and send everything to it. They wire their agent to a frontier model because it never embarrasses them, and then that frontier model classifies support tickets, extracts dates from emails, and reformats JSON at frontier prices. It is the equivalent of flying a surgeon in to change a lightbulb. Model routing is the fix, and it is the single highest-leverage cost decision most teams have not made yet.
This guide breaks down exactly what routing is, the real 2026 price ladder that makes it worth doing, the techniques from cost cascades to trained classifiers, the platforms that implement it, and the failure modes that quietly hand your savings back. It assumes no deep machine-learning background. It does assume you are tired of guessing where your money went.
Contents
- Why one model for everything is the expensive default
- Where the money goes: the agent token multiplier
- The 2026 price ladder: what models actually cost
- What model routing is, and what it is not
- The routing playbook: cascades, classifiers, and semantic routes
- Routing's force multipliers: caching, batching, and cheaper models
- The platform landscape: gateways versus routers
- Building a router: a practical walkthrough
- Where routing fails: the failure modes that eat your savings
- Measuring what matters: evals, attribution, and escalation rate
- Build, buy, or autopilot: choosing your approach
- The future outlook: agents, routers, and the price of intelligence
- Conclusion: a decision framework
The 2026 Routing Platform Scoreboard
Before the detail, here is the whole field on one page. The table below ranks the twelve most relevant routing and gateway platforms for a founder or small team trying to cut agent cost without a dedicated infrastructure hire. Every score is on a 0 to 10 scale, and every cell carries the actual reason for the score, not a bare number. The final column is the weighted average, and the rows are sorted by it, highest first.
The criteria are chosen from first principles: what does a cost-conscious builder actually need from a routing layer? First, a cost model that does not tax you for the privilege (weighted highest, because a gateway that marks up tokens fights the goal). Second, automatic cost routing, meaning the layer decides which model handles a request rather than making you hard-code it. Third, reliability, because a cheaper request that fails is not cheaper. Fourth, breadth and ease, since a non-technical founder cannot adopt a tool that needs a platform team. Fifth, durability, because 2026 has already seen acquisitions and maintenance-mode shutdowns in this space.
| # | Platform | What It Does | Cost model (30%) | Auto cost routing (25%) | Reliability (20%) | Breadth & ease (15%) | Durability (10%) | Final |
|---|---|---|---|---|---|---|---|---|
| 1 | OpenRouter | Gateway: one OpenAI-compatible API to 400+ models with auto-failover | 8 - no token markup, ~5% credit-purchase fee | 6 - "auto" meta-model + per-request pinning, not a trained classifier | 9 - provider load-balancing + same-model failover | 10 - single API, 8M+ users, trivial setup | 10 - $113M Series B, $1.3B valuation, 25T tokens/wk | 8.2 |
| 2 | Azure AI Foundry Model Router | Cloud-native: a trained router picks the best catalog model per prompt | 8 - standard per-token, no routing surcharge | 8 - trained complexity router, Quality/Cost/Balanced modes | 8 - transparent failover to next-best model | 6 - Azure-bound catalog | 9 - Microsoft-backed | 7.8 |
| 3 | AWS Bedrock Prompt Routing | Cloud-native: routes each prompt to the cheapest capable model in a family | 8 - no separate routing charge, standard tokens | 7 - automatic difficulty routing, one model family only | 8 - AWS-native reliability | 6 - requires the Bedrock ecosystem | 9 - AWS-backed | 7.6 |
| 4 | LiteLLM | Open-source proxy: unified OpenAI-format calls to 100+ models with budgets | 10 - free, self-hosted, pay only infra | 4 - config/rule routing + load balancing, no classifier | 8 - fallbacks, rate-limit-aware routing | 7 - 100+ models, developer setup | 9 - ~50K GitHub stars, YC-backed, huge adoption | 7.6 |
| 5 | Cloudflare AI Gateway | Cloud-native: one endpoint with caching, spend limits, dynamic routes | 9 - core features free, optional 5% billing fee | 5 - dynamic routes + budget fallback, rule-based | 8 - caching, rate limits, real-time spend caps | 7 - 24+ providers, one endpoint | 9 - Cloudflare platform reach | 7.5 |
| 6 | RouteLLM | Open-source router: trained classifiers send easy prompts to the cheap model | 10 - free, Apache-2.0, pay only model costs | 9 - trained difficulty routers (matrix factorization, BERT) | 4 - a library you run, failover is your job | 5 - drop-in client, but you train and host it | 6 - LMSYS research project, ~4K stars | 7.4 |
| 7 | Vercel AI Gateway | Gateway: passes provider prices through, fails over between providers | 9 - zero markup, free BYOK, $0.10/1K requests for extras | 4 - cross-provider failover + manual cost tiering | 8 - failover rescued 3.5% of requests over 1T tokens/mo | 8 - tight AI SDK and Next.js integration | 8 - Vercel-backed | 7.3 |
| 8 | Portkey | Gateway: managed routing, caching, guardrails over 1,600+ models | 7 - free dev tier, $49/mo production | 5 - conditional/weighted routing + semantic cache | 8 - fallbacks, load balancing, caching | 8 - 1,600+ models, prompt management | 7 - $15M Series A, acquired by Palo Alto Networks | 6.9 |
| 9 | Not Diamond | Router: a learned meta-model sends each query to the best LLM | 6 - small per-Mtok fee, rate not published | 9 - learned quality-and-cost router | 5 - sits beside your gateway, not the inference layer | 7 - stack-agnostic, easy to add | 5 - independent, funding undisclosed | 6.6 |
| 10 | Martian | Router: "model mapping" routes each query to the best/cheapest LLM live | 5 - usage-based, rates sales-gated | 9 - trained difficulty/quality router | 6 - routing service with failover | 6 - used across 300+ companies | 6 - $9M seed, founded 2022 | 6.5 |
| 11 | Requesty | Gateway: 400+ models via one endpoint with latency routing and caching | 6 - flat 5% token markup, caching offsets it | 5 - latency-based routing + failover | 8 - failover, caching, 5-layer RBAC, EU residency | 8 - OpenAI-compatible, 400+ models | 6 - growing, funding undisclosed | 6.5 |
| 12 | Unify | Router: a "Neural Router" predicts quality from prompt complexity | 6 - usage-based, $100 free credits, rates unpublished | 8 - proprietary pre-call quality router | 6 - routes to best provider by targets | 6 - managed, expanding to multimodal | 5 - mid-tier traction | 6.4 |
Two patterns jump out of that ranking, and both matter more than any single row. The first is that cost and routing intelligence rarely live in the same tool. The platforms with the cleanest economics (OpenRouter, LiteLLM, Vercel, Cloudflare) are mostly passthroughs: they get you to any model cheaply but leave the "which model" decision to you. The tools that genuinely decide per request (Martian, Not Diamond, RouteLLM, the cloud routers) are the ones with less transparent pricing or narrower reach. The highest scores go to platforms that combine near-zero markup with at least some automatic decisioning, which is why OpenRouter tops the list on breadth and economics even though its routing is lighter than a trained classifier.
The second pattern is that "routing" is two different products wearing one word, and confusing them is the most common buying mistake. Sections 4 and 7 pull them apart. For now, read the scoreboard as a map, not a verdict: the best tool for a solo founder shipping a side project is not the best tool for a fifty-person company with a compliance team, and the sections below explain which trade-offs move you up or down this list.
1. Why one model for everything is the expensive default
Start with the structural question, not the shopping question. The shopping question is "which model is best?" The structural question is "what am I actually buying when I call a model, and does every request need the same amount of it?" The answer is that you are buying reasoning per token, and the amount of reasoning a task needs varies by orders of magnitude. Extracting a phone number from an email needs almost none. Writing a legal argument needs a great deal. When you send both to the same frontier model, you pay the legal-argument price for the phone-number task, every single time, forever.
This is not a rounding error. It is the dominant cost line in most AI products, and it hides in plain sight because the default developer workflow actively encourages it. You prototype against the smartest model because you want the demo to work, you ship that same wiring, and traffic grows. The model never changes because changing it feels risky and the bill, at first, feels tolerable. By the time it does not feel tolerable, the frontier model is load-bearing across a hundred code paths and nobody remembers which of them actually needed it. The mistake compounds precisely because the smart model is so good that it papers over the question of whether it was necessary.
The economic principle underneath routing is old and boring, which is a good sign: match the cost of the resource to the value of the job. Every mature industry does this. Cloud computing separated storage tiers from compute tiers so you would not pay for a database to hold a cold backup. Shipping separates overnight air from ground freight. Intelligence is now a metered utility with a two-order-of-magnitude price range, and treating it as a single flat rate is the same category of error as running your entire warehouse on overnight air because it is fast. We covered the broader shift toward metered, outcome-priced AI in our guide to what it costs to build an app with AI, and routing is simply the operational discipline that shift demands.
The counterintuitive part, and the reason routing is a real opportunity rather than obvious hygiene, is that the cheap models got shockingly good. Five years ago, routing away from the best model meant routing toward something visibly dumber. In 2026, the gap between a mid-tier model and a frontier model on ordinary business tasks is often invisible to the end user, while the price gap stays enormous. That divergence, capability converging while price stays spread, is the entire reason routing pays. The next two sections quantify both halves: why agents spend so much, and how wide the price ladder actually is.
2. Where the money goes: the agent token multiplier
To route intelligently you first have to understand where an agent's tokens actually go, because the answer is not "the final answer." An agent is a loop. It reads a large system prompt and a pile of tool definitions, it thinks, it calls a tool, it reads the result, it thinks again, and it repeats until it decides it is done. Every one of those turns re-sends context. The visible output, the paragraph the user reads, is a tiny fraction of the tokens the task consumed. This is the first thing routing has to reckon with, because it means the cost of a task is dominated by internal machinery the user never sees.
Anthropic put hard numbers on this from its own production system, and they are the most defensible figures in the space. A single agent uses about four times the tokens of a chat interaction, and a multi-agent system uses about fifteen times as many - Anthropic Engineering. The same analysis found that token usage explained roughly 80% of the performance variance, with the number of tool calls and the choice of model explaining most of the rest. In plain terms: agents are good because they spend tokens, and they are expensive for exactly the same reason. There is no version of a capable agent that is also token-cheap by nature. The only lever is spending those tokens on the right model.
The multiplier interacts viciously with failure. Most agent frameworks retry a failed step by replaying the entire conversation so far, the system prompt plus every prior step plus the failed attempt, not the single failed call in isolation. So a 20% per-step failure rate does not add 20% to the bill; with context replay it pushes toward 2x, because each retry re-bills the whole history - TianPan. Chain enough steps and even a small per-call error rate turns into a large invoice multiplier. This is why a system that "works fine" in a demo can produce a shocking bill in production: the demo ran the happy path once, and production runs the loop thousands of times a day with real-world failure rates.
The multiplier gets steeper still when agents spawn other agents. A multi-agent system runs several sub-agents in parallel, and each one carries its own context window and its own tool-call chain, so their token cost does not merge, it stacks. That is why the jump from a single agent to a full multi-agent system is roughly four times to fifteen times rather than a modest increment, and why the same coding assistants that feel magical can quietly become the largest line on an engineering budget, a dynamic we broke down in our comparison of Claude Code, Codex, and Devin. The takeaway is not to avoid multi-agent designs, which genuinely outperform on hard work, but to reserve them for tasks whose value justifies the fan-out, and to route the individual sub-agents to cheaper models wherever the sub-task allows. Fan-out and routing are two sides of the same discipline: spend more parallel intelligence only where it pays, and spend it at the lowest tier that still clears the bar.
Now add the second-order effect: falling unit prices do not save you. This is the paradox at the center of the 2026 cost story. The price of a token has been in freefall, yet aggregate spend more than doubled in six months because agentic consumption outran the price cuts - Menlo Ventures. Cheaper tokens simply made it economically rational to run more agents, longer loops, and more parallel sub-agents, so total tokens grew faster than price per token shrank.
The practical lesson for anyone building agents is that you cannot wait for prices to save you, because your own success will outrun them. A healthcare company's agent bill reportedly climbed from $12,000 to $68,000 in six weeks as usage scaled, and coding-agent tooling has been reported to run $500 to $2,000 per engineer per month at scale - Cockroach Labs. Those are illustrative figures rather than audited case studies, and one widely circulated anecdote of a single autonomous agent burning $1.3 million of tokens in a month is exactly the kind of unverified builder claim to treat as color, not data. But the direction is unambiguous and matches the primary Anthropic numbers: agent cost grows with usage, retries, and fan-out, and routing is one of the few levers that bends the curve without cutting capability. The teams that stay solvent are the ones that decided, early, that not every token deserves the best model.
3. The 2026 price ladder: what models actually cost
Routing only pays because the ladder is steep, so it is worth seeing the real rungs. The table below is a snapshot of live 2026 pricing across the major providers, expressed in dollars per million tokens for input and output. Prices move constantly and several of these are promotional, so treat the exact figures as a point-in-time reference and re-verify before you wire anything to them. What matters is not any single number but the shape: a span from roughly a dime to thirty dollars on input, and from under a dollar to a hundred and eighty dollars on output.
| Provider | Model | Tier | Input $/M | Output $/M | Context |
|---|---|---|---|---|---|
| DeepSeek | DeepSeek V4-Flash | Cheap | $0.14 | $0.28 | 128K |
| Gemini 3.1 Flash-Lite | Cheap | $0.125 | $0.75 | 1M | |
| xAI | Grok 4.1 Fast | Cheap | $0.20 | $0.50 | 500K |
| OpenAI | GPT-5.4 Nano | Cheap | $0.20 | $1.25 | 400K |
| Meta | Llama 4 Maverick | Cheap | $0.20 | $0.60 | 1M |
| Gemini 3 Flash | Mid | $0.50 | $3.00 | 1M | |
| Mistral | Mistral Large 3 | Mid | $0.50 | $1.50 | 256K |
| DeepSeek | DeepSeek V4-Pro | Mid | $0.435 | $0.87 | 128K |
| Anthropic | Claude Haiku 4.5 | Cheap | $1.00 | $5.00 | 200K |
| Anthropic | Claude Sonnet 5 | Mid | $2.00 | $10.00 | 1M |
| OpenAI | GPT-5.4 | Mid | $2.50 | $15.00 | 1M |
| Gemini 3 Pro | Frontier | $2.00 | $12.00 | 1M | |
| xAI | Grok 4.5 | Frontier | $2.00 | $6.00 | 500K |
| Anthropic | Claude Opus 5 | Frontier | $5.00 | $25.00 | 1M |
| OpenAI | GPT-5.5 | Frontier | $5.00 | $30.00 | 400K |
| Anthropic | Claude Fable 5 | Frontier | $10.00 | $50.00 | 1M |
| OpenAI | GPT-5.5 Pro | Frontier | $30.00 | $180.00 | 400K |
Look at the extremes. On output, GPT-5.5 Pro at $180 is roughly 240 times the price of Gemini 3.1 Flash-Lite at $0.75, and about 640 times DeepSeek V4-Flash at $0.28. The Anthropic pricing is verified live from the official pricing page; the others are drawn from 2026 pricing trackers and should be re-checked against each provider before you commit - Anthropic pricing. The spread is not a quirk of the cheapest and most expensive outliers, either. Even inside a single family, Anthropic's Fable 5 output at $50 is ten times Haiku 4.5 at $5, and OpenAI's GPT-5.5 Pro input at $30 is a hundred and fifty times its own Nano tier. Routing exploits both the across-vendor and the within-vendor spread.
The grouped chart below makes the tiering legible on a readable scale, dropping the extreme frontier outlier so the mid and cheap tiers do not flatten to nothing. Notice that output is where the real money is: every model charges several times more for tokens it generates than for tokens it reads, which is why verbose agents and chatty reasoning traces are so expensive, and why the choice of model for output-heavy work matters most.
The other structural feature to internalize is that the middle tier is where most production traffic should live. The frontier tier (Opus 5, GPT-5.5, Gemini 3 Pro, Grok 4.5) is for genuinely hard reasoning. The cheap tier (Haiku 4.5, Gemini Flash-Lite, DeepSeek V4-Flash, GPT-5.4 Nano) is for classification, extraction, and formatting. But the mid tier (Sonnet 5, Gemini 3 Flash, GPT-5.4, Mistral Large 3, DeepSeek V4-Pro) is the workhorse, near-frontier quality at a fraction of frontier price, and a well-designed router sends the bulk of ordinary requests there while reserving the top tier for the minority of prompts that truly need it. Anthropic's own lineup is a clean illustration of the three rungs: Haiku 4.5 for cheap, high-volume tasks, the near-frontier Sonnet 5 as the everyday workhorse (we profiled its build quality in our guide to Claude Sonnet 5 for building websites), and Opus 5 or the premium Fable 5 held back for the hardest reasoning (benchmarked in our Claude Opus 4.8 guide). If you are still deciding which base model to build on before you even think about routing, our breakdown of the best AI model to build your app walks the same ladder from a builder's chair. One caveat worth stating plainly: several of these prices are introductory. Claude Sonnet 5's $2/$10 rate rises to $3/$15 after August 31, 2026, and Qwen's flagship is running a temporary discount. Routing decisions should be re-tuned when prices reset, because a rung moving can change which model wins a route.
4. What model routing is, and what it is not
At its simplest, model routing is a decision layer that sits in front of your models and chooses which one handles each request. Instead of your code calling a fixed model, it calls the router, and the router decides: cheap model for the easy request, strong model for the hard one, and sometimes a specialist model for a particular domain. That is the whole idea. Everything else, the classifiers, the cascades, the gateways, is implementation detail in service of that one decision. The reason it works is the reason from Section 3: because a large share of real traffic is easy, and easy requests do not need expensive models.
It helps to see the before and after side by side, because the shift is architectural rather than cosmetic. In the old model, a human or an application talks to one fixed model for everything. In the routed model, a thin decision layer inspects each request and dispatches it to whichever model fits, escalating only when needed. The application code barely changes; what changes is that "which model" stops being a hard-coded constant and becomes a runtime decision informed by the request itself.
Now the crucial distinction, the one the scoreboard hinted at. The word "routing" covers two genuinely different capabilities that buyers constantly conflate. The first is trained, difficulty-aware routing: a system that predicts, per request, which model is needed and dispatches accordingly, actively cutting cost by keeping cheap models busy. The second is rule-based routing and failover: load balancing across providers, weighted splits for A/B tests, and fallback to another provider when one is down. The second kind is about reliability and governance; it does not, by itself, cut cost by matching model to difficulty. Both are useful. Only the first delivers the automatic savings people imagine when they hear "routing," and a great deal of buyer disappointment comes from purchasing the second while expecting the first.
For readers who prefer to see a concept demonstrated before reading about it, the short explainer below covers the same idea in visual form: sending each request to the cheapest model that can handle it, and why that beats a single-model setup.
The distinction also reframes what you are optimizing. A pure gateway makes every model reachable through one interface and cheap to call, but leaves the decision to you, which is perfect if you already know your routing rules. A trained router makes the decision for you, which is valuable precisely when you cannot articulate the rule because "hard" is fuzzy and prompt-dependent. Most sophisticated setups end up using both: a gateway for reach and reliability, and a routing policy (hand-written rules, a cascade, or a trained classifier) layered on top to make the cost-saving decision. The rest of this guide treats them as complementary, not competing.
5. The routing playbook: cascades, classifiers, and semantic routes
There are three main ways to make the routing decision, and they differ in one fundamental respect: when they decide. A cascade decides after seeing an answer. A classifier decides before generating anything. A semantic route decides by matching the request against known intents. Understanding that timing difference is the key to choosing among them, because it determines what each approach can know and what it costs you to run.
The oldest and most intuitive approach is the cost cascade, formalized in the 2023 Stanford paper FrugalGPT - arXiv. A cascade tries the cheapest model first, then runs a small, cheap scoring function that estimates whether the answer is reliable. If the score clears a learned threshold, it accepts the cheap answer and stops. If not, it escalates to the next model up. FrugalGPT's headline claim is striking: it could match the performance of the best single model at the time with up to 98% cost reduction, by only escalating the small fraction of queries the cheap model got wrong. The elegance is that the cascade needs no crystal ball; it judges actual answers. The catch, which Section 9 returns to, is that you always pay for at least the cheap attempt, and when the scorer is miscalibrated you pay for the cheap attempt and the expensive one.
The more modern approach is predictive routing, and its reference implementation is RouteLLM from LMSYS and Berkeley, published at ICLR 2025 - arXiv. Rather than run a model and judge the output, RouteLLM predicts, before generation, whether a prompt needs the strong model at all. It learns this from human preference data (roughly 80,000 head-to-head battles from Chatbot Arena) using several router architectures, of which a matrix-factorization model performed best. The published results are the anchor numbers of the whole field: over 85% cost reduction on MT-Bench while retaining about 95% of the strong model's quality, achieved by sending only a minority of prompts to the expensive model - LMSYS. With better training data, the router called the strong model only 14% of the time, down from 26%.
The single most important nuance in that image, and the one most cost articles omit, is that the savings are entirely task-dependent. RouteLLM cut cost by 85% on open-ended chat (MT-Bench) but only about 45% on knowledge questions (MMLU) and 35% on math (GSM8K) - LMSYS. The reason is structural: on chat, a huge fraction of prompts are easy enough for the cheap model, so the router can offload most of them. On math, far more prompts genuinely need the strong model, so there is less to offload. This means you cannot quote a single "routing saves X%" number honestly. Your savings depend on the difficulty distribution of your actual traffic, which is why measuring your own workload beats trusting a vendor's benchmark.
The third approach, semantic routing, is the cheapest to run because it makes no model call at all. The popular open-source library semantic-router from Aurelio embeds a set of example utterances for each route at startup, then embeds each incoming request once and picks the route with the highest similarity - GitHub. Because it is a vector lookup rather than a generation, the decision takes on the order of five milliseconds instead of the seconds an LLM router would add. Semantic routing shines when your requests fall into a fixed set of known intents (billing questions here, code questions there, small talk over there) and each intent has a natural best model. Its limitation is that it only routes to intents you predefined; a novel request near a decision boundary gets misrouted, and it does no reasoning about difficulty. In practice, teams often combine a fast semantic route for the obvious cases with a cascade or classifier for the ambiguous ones, buying the speed of embeddings where the request is clear and the judgment of a heavier method where it is not.
6. Routing's force multipliers: caching, batching, and cheaper models
Routing decides which model pays for a request, but it is only one of four levers, and treating it as the whole solution leaves most of the savings on the table. The other three are: do not re-pay for tokens you already sent (caching), defer work that is not urgent (batching), and lower the unit price of the cheap models themselves (distillation, quantization, speculative decoding). A serious cost program uses all four, because they multiply rather than merely add, and because caching in particular often saves more than routing does for agentic workloads.
Prompt caching is the highest-value lever for agents specifically, because agents re-send an enormous, stable prefix (system prompt, tool definitions, retrieved documents) on every single turn. Caching that prefix turns those repeated input tokens from full price into a fraction. Anthropic charges cache reads at just 10% of the base input price, a 90% saving on cached tokens, with a modest write premium the first time - Anthropic docs. OpenAI applies an automatic 50% discount on cached input for prompts over roughly a thousand tokens, with no code change required - OpenAI. Google's Gemini context caching goes further on its newest models. The discipline that unlocks this is simple but easy to get wrong: put invariant content first and volatile content last, or you invalidate the cache every turn and pay full price anyway.
Batching is the lever for anything that does not need an answer in real time: overnight evals, bulk classification, document processing, data labeling, content generation pipelines. Both Anthropic and OpenAI offer a flat 50% discount on batched requests that return within a 24-hour window, and Anthropic's batch discount stacks with prompt caching for compounded savings - Anthropic docs. The trade is latency for money, so batch is useless for anything a user is waiting on, but for the large hidden category of asynchronous back-office work (the sort of reporting, enrichment, and reconciliation tasks we catalog in our guide to automating your startup back office) it halves the bill for free. Many teams discover, once they audit their traffic, that a surprising share of it never needed to be synchronous at all, and moving that share to batch is one of the fastest wins available. Batch and caching also compound: a nightly evaluation run that reuses a cached system prompt and submits through the batch endpoint pays a fraction of what the same run would cost synchronously at full price.
The fourth lever operates on the models themselves rather than the requests, and it matters because it makes the cheap end of your router even cheaper. Distillation trains a small "student" model on a large "teacher" model's outputs, capturing most of the behavior in a fraction of the size; the classic result is a distilled model retaining around 97% of the original's quality while running far faster - arXiv. Quantization shrinks the numeric precision of a model's weights (from 16-bit to 8-bit or lower), cutting memory and compute per token with minimal quality loss when done carefully - arXiv. Speculative decoding uses a small draft model to propose tokens that a large model verifies in parallel, delivering two to three times the throughput with identical output - arXiv. Most founders will not implement these directly; they matter because they are why the cheap tier keeps getting cheaper and better, which continuously widens the case for routing. If you are assembling the broader stack these levers plug into, our guide to the AI-native company tech stack puts them in context alongside the rest of the infrastructure.
7. The platform landscape: gateways versus routers
With the techniques clear, the platform choices make more sense, because every platform is really a packaging of one or more of those techniques plus the plumbing to make it usable. The scoreboard ranked twelve; this section explains the categories they fall into and profiles the ones that matter most, so you can see why a given tool scored where it did. The single most useful lens is the gateway-versus-router distinction from Section 4, because it predicts whether a tool saves you money automatically or merely makes it easy to save money yourself.
The gateways are the reach-and-reliability layer, and OpenRouter is the category leader for good reason. It fronts more than 400 models behind one OpenAI-compatible API, adds no token markup (monetizing through a roughly 5% credit-purchase fee), and automatically fails over between providers hosting the same model. Its scale is real: a $113 million Series B at a $1.3 billion valuation, around 25 trillion tokens a week, and over 8 million users - TechCrunch. It offers an "auto" meta-model and per-request price sorting, but its routing is lighter than a trained difficulty classifier, so it earns its top rank on economics, breadth, and reliability rather than on automatic decisioning. For a founder who wants one endpoint, every model, and no markup, it is the obvious default.
The open-source gateway of choice is LiteLLM, which proxies calls to more than 100 model APIs in a unified OpenAI format with cost tracking, virtual keys, budgets, and fallbacks - GitHub. Self-hosting is free, which is why it scores a perfect 10 on cost and has accumulated tens of thousands of GitHub stars, but it routes by configuration and rules rather than by a trained classifier, so the cost-cutting decision remains yours to design. Portkey occupies the managed middle, layering routing, caching, guardrails, and observability over 1,600 models with a free developer tier and a $49-per-month production plan; its acquisition by Palo Alto Networks in 2026 signals durability but also a likely shift toward enterprise security positioning - TrueFoundry. Requesty, Vercel AI Gateway, and Cloudflare AI Gateway round out the gateway field, differing mainly in markup model (Requesty's transparent flat 5%, Vercel and Cloudflare at zero markup with per-request or unified-billing fees) and in how deeply they integrate with an existing platform.
The routers are the automatic cost-cutting layer, and they are where the trained-classifier techniques from Section 5 show up commercially. Martian routes each query in real time using a proprietary "model mapping" interpretability technique and is used across more than 300 companies on a $9 million seed - Yahoo Finance. Not Diamond offers a stack-agnostic learned meta-model that sits alongside your existing gateway and charges a small metered fee below the cost of the cheapest model it routes to - Not Diamond. Unify predicts response quality from prompt complexity against live benchmarks. And the open-source RouteLLM lets you run the ICLR-published routers yourself for free, which is unbeatable on cost but puts the training, hosting, and failover on your plate. The common thread is that these tools decide for you, which is exactly what you want when "hard" is fuzzy, and exactly what you do not need if your routing rules are already obvious.
The cloud-native routers deserve their own mention because they bundle routing into a platform you may already be on. AWS Bedrock Intelligent Prompt Routing automatically routes each prompt to the cheapest capable model within a family at no separate routing charge, claiming cost reductions up to around 30% and more on simple tasks - AWS. Azure AI Foundry Model Router deploys a trained router as a single endpoint with selectable Quality, Cost, or Balanced modes - Microsoft Learn. These score well on durability and reliability but trade breadth for lock-in: they route within their own catalog, not the whole market. For a team already committed to a cloud, that is a feature; for one that wants provider independence, it is the thing to weigh against a neutral gateway.
8. Building a router: a practical walkthrough
Theory is cheap; here is how routing actually gets built, starting from the smallest useful version. The mistake beginners make is to reach for a trained classifier on day one. The right first move is far simpler: measure your traffic, then write a handful of rules. You cannot route intelligently until you know what fraction of your requests are easy, and you learn that by logging your current single-model usage and sampling it. Almost every team that does this is surprised by how much of their volume is trivial. That surprise is the business case, quantified.
The simplest real router is a cost cascade in a dozen lines: try the cheap model, check the answer with a fast verifier, and escalate only on failure. The verifier can be a schema check, a confidence heuristic, or a cheap model asked "is this answer adequate?" The example below sketches the pattern against an OpenAI-compatible gateway, where switching models is a one-line change because every model shares the same interface. The specifics matter less than the shape: cheap attempt, verify, conditional escalation.
# Minimal cost cascade against an OpenAI-compatible gateway (e.g. OpenRouter).
# Cheap model first; escalate to the frontier model only if the answer fails a check.
from openai import OpenAI
client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=API_KEY)
CHEAP = "anthropic/claude-haiku-4.5"
STRONG = "anthropic/claude-opus-5"
def answer(prompt: str, is_adequate) -> str:
draft = client.chat.completions.create(
model=CHEAP,
messages= [{"role": "user", "content": prompt}],
).choices [0].message.content
if is_adequate(draft): # schema check, confidence rule, or cheap judge
return draft # ~most traffic stops here, at the cheap price
return client.chat.completions.create( # escalate the minority that needs it
model=STRONG,
messages= [{"role": "user", "content": prompt}],
).choices [0].message.content
The verifier is the whole game, and it is where cascades succeed or fail. A verifier that is too lax ships bad cheap answers; one that is too strict escalates everything and you pay twice. For structured tasks, the verifier can be exact: does the output parse as valid JSON with the required fields, does the extracted date fall in a plausible range, does the classification land in the allowed set? For open-ended tasks, you need a cheap model as a judge, and you must accept that the judge is imperfect. This is why cascades work beautifully for extraction, classification, and formatting, and less well for open-ended generation where "adequate" is subjective. Match the method to the task.
Once rules and cascades are working, you graduate to configuration-driven routing on a gateway or a trained router, and the decision tree below (from OpenRouter's own cost guide) captures the practical choices: when to use free models, when to sort by price floor, when to set a hard price cap, and when to bring your own provider key. These are the knobs that turn a rough router into a tuned one, and they are worth setting deliberately rather than by default.
A concrete, hands-on walkthrough helps at this stage, and the tutorial below works through the OpenRouter API and its intelligent routing end to end, which is a useful companion if you learn by building alongside a video rather than from documentation alone.
The order of operations matters as much as any individual step. Start with measurement, add rules for the obvious cases, add a cascade for the tasks with a cheap verifier, layer caching and batching underneath, and only reach for a trained router when your rules can no longer capture the nuance. Skipping to the sophisticated end wastes effort on a problem you have not yet measured. Building agents from scratch is its own discipline, and if you are earlier in that journey, our guide to building software with AI covers the surrounding architecture that a router plugs into.
9. Where routing fails: the failure modes that eat your savings
Routing is not free money, and the guides that present it that way are setting readers up to lose quality or, worse, lose money while believing they saved it. Every routing approach has a characteristic failure mode, and the dangerous ones share a property: they look like success on the dashboard. This section walks the failure modes in the order you are likely to hit them, because knowing them in advance is the difference between a router that saves 40% and one that silently costs you customers.
The most common failure is hard-task misclassification. A genuinely difficult query gets scored "easy" and sent to the cheap model, which returns a confidently wrong answer. This is tolerable if you measured that cheap model against the route and it cleared your bar; it is a silent quality regression if you routed on vibes. The insidious version is silent quality erosion: a cost-tuned router with no quality guardrail quietly shifts too much traffic to the cheap model, the bill drops immediately and visibly, and the quality loss shows up weeks later as churn and complaints you never connect back to the routing change - DigitalApplied. The failure looks exactly like a win, which is what makes it the one to fear most.
The second failure is unique to cascades: double-billing on escalation. In a try-cheap-then-escalate design you pay for the cheap attempt plus the frontier call every time the verifier rejects. If the verifier is too strict, or if a provider quietly changes the cheap model's output format so the check starts failing, escalations can spike toward 100% and you get the worst of both worlds, the cheap bill and the expensive bill on the same request. One documented case saw a provider update subtly change a cheap model's formatting, its schema check began failing on most responses, and the router silently escalated around 90% of traffic to the most expensive model - TMLS. The tell is not an error rate; it is the escalation rate, and it only shows up on the invoice unless you watch for it.
The third failure is the most surprising, because it is the opposite of what you configured. Formally studied in a 2026 paper titled "When Routing Collapses," researchers found that as you raise the cost budget, routers degenerate toward always picking the most expensive model even when cheaper ones suffice - arXiv. The root cause is an objective-decision mismatch: routers are trained to predict a smooth score, but the actual routing choice is a fragile discrete comparison, so in the small-margin regime tiny errors flip the decision toward the expensive model. A router you installed to save money can, under the wrong settings, quietly maximize spend. This is not a reason to avoid routing; it is a reason to benchmark your router's actual model-selection distribution rather than assume it obeys your intent.
Two more failure modes round out the picture, and both come from the assumption that models are interchangeable. They are not. Prompt-format drift means a prompt tuned for one model degrades on another, because different models want different structures, examples, and phrasing, and tokenizer differences quietly change token counts and cost. Silent capability loss on structured output is worse: a cheaper model can satisfy a JSON schema while dropping optional fields or subtly changing value distributions, so downstream code ingests bad data with no error thrown. Compounded over an agent loop the arithmetic is brutal: at 97% per-call compliance, a ten-step loop completes cleanly only about 74% of the time, and a twenty-step loop about 54% - TianPan. Routing to a cheaper model on a tool-heavy agent path is exactly where this bites, which is why the next section argues that measurement is not optional overhead but the thing that makes routing safe.
10. Measuring what matters: evals, attribution, and escalation rate
If you take one operational lesson from this guide, take this: routing without measurement is how you ship a silent quality regression. Every failure mode in Section 9 is invisible on a naive dashboard, because the naive dashboard shows cost going down and treats that as success. The whole discipline of safe routing is building the three or four metrics that make quality loss and cost blowups visible before your customers make them visible for you. This is not enterprise overhead; it is the minimum instrumentation that lets a small team route aggressively without fear.
The reason this gets skipped is that pilot economics bear almost no relationship to production economics, and the gap is enormous. A pilot runs a handful of requests through a smart model and looks great. Production runs a multi-step agentic loop thousands of times a day with real failure rates, retries, and fan-out. Surveys have found that fewer than a third of organizations can clearly attribute their AI spend to measurable business outcomes - Cockroach Labs. If you cannot connect spend to outcomes, you cannot tell whether a routing change helped or hurt, and you are flying blind in exactly the moment routing makes the plane more complex.
The instrumentation that fixes this is not exotic; it is four things measured per route. First, per-route quality: for each route, a small held-out eval set the cheap model must pass, re-run whenever a model updates, so a route that degrades gets caught by a test rather than by a customer. Second, per-conversation token attribution: cost tracked at the level of a task or conversation, not just a global monthly total, so you can see which routes and which users drive spend. Third, escalation rate: the share of cascade requests that fall through to the expensive model, alerted on directly, because as Section 9 showed, a runaway escalation rate is the earliest signal of a cost blowup and it appears nowhere else. Fourth, the model-selection distribution: what fraction of traffic each model actually handled, checked against what you intended, to catch routing collapse.
The payoff of this instrumentation is that it converts routing from a gamble into a controlled optimization. With per-route evals you can push more traffic to the cheap model until quality dips, then stop, confident you are at the efficient frontier rather than past it. With escalation-rate alerting you catch a provider's silent format change in hours instead of on the next invoice. With token attribution you find the three routes driving 80% of cost and focus there. None of this requires a platform team; the observability layer is built into most of the gateways in Section 7, and even a simple logging wrapper captures the essentials. The teams that route safely are not the ones with the smartest classifier; they are the ones who measured, and the measurement is what lets them be aggressive about cost without being reckless about quality. This same measure-then-optimize discipline is what separates durable AI products from expensive experiments, a theme we return to in our guide to running the autonomous business.
11. Build, buy, or autopilot: choosing your approach
The honest answer to "should I build routing myself or buy it?" is that it depends on where your time is most valuable, and for most founders the surprising conclusion is that the routing layer is not where you should be spending your scarcest hours. Reason from first principles: routing exists to save money on inference, but the money it saves has to exceed the engineering time it costs to build and maintain, and for a small team that math often favors buying or, increasingly, not touching it at all. The three paths (build, buy, autopilot) suit three different situations, and picking the wrong one is its own kind of waste.
Building makes sense when routing is core to your product and your traffic is large enough that a few points of savings are real money. If you are running millions of requests a day, a custom cascade tuned to your exact task distribution, with your own verifier and your own evals, will beat any general-purpose router, and the engineering cost amortizes fast. The open-source path (RouteLLM for the classifier, LiteLLM as the gateway, your own caching discipline) gives you full control at zero license cost. This is the right choice for AI-first companies whose margins live and die on inference efficiency, and for teams that already have the platform engineers to own it. For everyone else, building a router is a classic case of optimizing the thing that is easy to see (the AI bill) at the expense of the thing that is scarce (founder time).
Buying is the pragmatic middle, and it is where most teams should land. A gateway like OpenRouter or a managed router gives you 80% of the savings for a fraction of the effort, because someone else maintains the model integrations, the failover, and the observability. The 2026 pricing reality makes this easy: the leading gateways add little or no markup, so you capture the routing benefit while paying essentially provider rates. If you are a small team that wants to route without hiring for it, the correct move is usually to put a zero-markup gateway in front of your models, write a few rules, turn on caching, and move on with your life. The marginal savings from a bespoke system rarely justify the distraction for a company that sells something other than inference.
There is now a third path that did not meaningfully exist a couple of years ago: not managing the model layer at all, because an autonomous platform manages it for you. This is the model behind tools like Founden, which builds and runs an entire company from a plain description, choosing and orchestrating models for each task under the hood so the founder never opens a pricing page or writes a routing rule. The trade is the familiar one from Section 7: you gain enormous leverage and lose fine-grained control, which is the right trade for a non-technical founder whose comparative advantage is the business, not the inference stack, and the wrong one for an AI-infrastructure company whose product is the routing itself. The point is not that autopilot beats building; it is that "who should even be making routing decisions" is now a real question, and for a large and growing share of founders the honest answer is "not me." This is the operating model behind the rise of the one-person company, where a single founder runs what used to take a team by pushing the operational plumbing (model choice included) down to software, a shift we mapped in The Rise of the Solopreneur. The broader case for that hands-off posture is laid out in our guide to hiring an AI workforce to run your company.
It is worth grounding this in how practitioners actually operate. Yuma Heymans (@yumahey), who co-founded the AI recruitment platform HeroHunt.ai and works on autonomous AI systems that run high-volume outreach across a billion candidate profiles, is a useful example of the pattern: at that scale, the cost-versus-quality decision on every model call is not a hobby, it is the difference between a viable unit economic and an unviable one, and the teams that win are the ones who treat model choice as an operational discipline rather than a one-time configuration. Whether you build, buy, or delegate that discipline, the requirement to have it does not go away.
12. The future outlook: agents, routers, and the price of intelligence
Reason forward from the structural forces and the trajectory becomes clear, even if the specific products do not. The two facts that will not reverse are these: intelligence keeps getting cheaper per token, and agents keep finding new ways to consume more tokens. Those two curves have been racing for three years, with consumption winning, and there is no sign of the race ending. That means routing is not a temporary hack for an expensive moment; it is a permanent discipline for a world where the cost of a task is a runtime decision rather than a fixed price. The teams that internalize this now build the muscle before they need it.
The near-term direction is that routing gets absorbed into the platforms, and the standalone router as a category faces pressure from both sides. The cloud providers now ship routing natively (AWS Bedrock, Azure Foundry), the gateways add lightweight routing on top of their reach, and the model providers build tiering into their own APIs. This is the normal path for a valuable capability: it starts as a separate product, proves its worth, and gets swallowed by the layer below it. The 2026 acquisitions and consolidations in the space (Portkey into Palo Alto Networks, Helicone into Mintlify) are early evidence of that absorption. For a buyer, the implication is to weight durability heavily, because the independent router you adopt today may be a feature of something larger tomorrow.
The deeper shift is that the routing decision itself is becoming an agent's job. The most sophisticated systems already treat model selection as part of the reasoning, not a preprocessing step: a lead agent decides how much firepower a sub-task deserves and dispatches accordingly, which is exactly the orchestrator-worker pattern Anthropic used to beat single-agent performance by 90.2% while accepting the 15x token cost for high-value work - Anthropic Engineering. As agents get better at estimating their own uncertainty, they will route themselves, escalating to a stronger model when they detect they are struggling and dropping to a cheaper one when the task is routine. Routing stops being a static policy you configure and becomes a dynamic behavior the system learns, which is both more powerful and, per the routing-collapse research, more in need of measurement.
The first-principles bottom line is that cheap intelligence does not reduce the importance of cost discipline; it raises it. When a resource gets cheaper, you use vastly more of it, and the total bill grows even as the unit price falls, which is precisely the paradox the enterprise-spend data already shows. The winners in this environment are not the teams with access to the cheapest models, because everyone has that. They are the teams that spend intelligence where it creates value and withhold it where it does not, at every layer, on every request. Routing is the mechanism for that judgment, and as agents proliferate it moves from a nice-to-have optimization to a core competency of any company that runs AI at scale. The companies that treat "how much intelligence does this task deserve?" as a first-class question will out-execute the ones that answer it once and forget it.
13. Conclusion: a decision framework
Model routing is, at its core, the refusal to pay frontier prices for trivial work, and in 2026 that refusal is worth a large fraction of your AI bill. The reason it pays is the combination the first sections established: agents consume tokens by design (four to fifteen times a chat), and the price ladder spans two orders of magnitude, so matching model to difficulty captures real money without capturing real quality loss, as long as you measure. Everything else in this guide is the elaboration of that one idea.
Here is the framework, stripped to its decisions. First, measure your traffic before you route anything, because your savings are entirely task-dependent and you cannot know them without your own data; a workload of easy classification will save far more than one of hard reasoning. Second, start simple and layer up: rules for the obvious cases, a cascade with a real verifier for tasks with a cheap quality check, caching and batching underneath for compounded savings, and a trained router only when your rules can no longer capture the nuance. Third, buy the plumbing rather than build it unless inference efficiency is your actual product, because a zero-markup gateway plus caching captures most of the benefit for almost none of the effort. Fourth, and non-negotiably, instrument per-route quality, escalation rate, and model-selection distribution, because every routing failure mode looks like success on a naive dashboard and only measurement makes the silent losses visible.
The choice of who makes these decisions is itself now a decision. If routing is core to your product, build it and own the frontier. If it is a cost you want to minimize without distraction, buy a gateway and move on. And if your comparative advantage is the business rather than the inference stack, the honest answer is increasingly to let an autonomous platform handle the model layer entirely and spend your scarce hours on the things only you can do. There is no universally correct answer, only the one that fits your traffic, your team, and where your time actually creates value. What is universal is the underlying truth: intelligence is a metered utility with a huge price range, and the teams that thrive are the ones that spend it deliberately.
This guide reflects the AI model and routing landscape as of August 2026. Model names, prices, and platform details in this rapidly moving space change frequently, and several prices cited here are promotional or introductory. Verify current model IDs and pricing on each provider's official pricing page before relying on them for cost decisions.