LLM routing: small vs frontier models, with the cost math
Send the easy requests to a small model and the hard ones to a frontier model. The idea is well established. The hard part is telling the two apart.
LLM routing means deciding, request by request, which model should answer. A small model is cheap and fast and handles most everyday requests well. A frontier model is slower and far more expensive, and it’s worth it for the hard ones. A router sits in front of both and picks. Done well, routing is one of the most dependable ways to reduce LLM API costs without a visible drop in quality.
None of this is new, and none of it is ours. Model routing and cascades are well studied, with published results and open-source implementations. This post covers what that work found, how routers make their decision, and a worked cost example. Then it covers the one thing we’re doing differently in DawnLoop’s design: letting the router see the memory graph.
Last verified: October 12, 2026.
What is LLM routing?
Models differ in price by a lot. When the FrugalGPT authors priced 12 commercial LLM APIs in March 2023, processing 10 million input tokens cost $0.20 on the cheapest (GPT-J, hosted by Textsynth) and $30 on GPT-4, a gap of two orders of magnitude. Prices have moved since, but the gap between small and frontier models hasn’t closed.
Real traffic is uneven. Many requests are routine (a lookup, a reformat, a question answered before), and a smaller share needs real reasoning. Frontier-only pays frontier prices for the routine share. Small-only saves money and quietly degrades the hard share.
A router splits the difference: it looks at each request and sends it to the cheapest model that can handle it. The idea is now mainstream. When OpenAI introduced GPT-5 in August 2025, it described ChatGPT as a system with a fast model, a deeper reasoning model, and “a real-time router that quickly decides which to use” based on conversation type, complexity, tool needs and the user’s explicit intent.
Routing vs. cascading: what’s the difference?
There are two basic shapes, and the names get used loosely.
- Routing decides before any answer exists. A router (a classifier, a small model, or a set of rules) reads the request and picks one model. One answer gets generated.
- An LLM model cascade decides afterwards. The cheapest model answers first, a scorer judges whether the answer is good enough, and if it isn’t, the request moves up to the next model. The first acceptable answer wins.
| Router | Cascade | |
|---|---|---|
| When it decides | Before generating | After each attempt |
| What it judges | The request | The answer |
| Cost of a hard request | Router call + frontier call | Small call + scorer + frontier call |
| Latency of a hard request | One generation | Two or more, in sequence |
| Typical failure | Misjudges a request that looks easy | Scorer accepts a wrong cheap answer |
Cascades have an information advantage: judging an actual answer is often easier than predicting one. Routers have a latency advantage: hard requests don’t pay for a failed cheap attempt first. Production systems often mix the two.
What did FrugalGPT find?
FrugalGPT (Lingjiao Chen, Matei Zaharia and James Zou, Stanford, 2023) is the paper most people cite for LLM cascades. It groups cost-cutting into prompt adaptation, LLM approximation (caching, fine-tuning a cheap model) and the LLM cascade.
Its cascade has two parts. A scoring function, a small DistilBERT regression model, predicts whether a given answer is correct. A learned list of up to three APIs, with a score threshold for each step, decides when to stop. On a financial-news dataset (HEADLINES), the learned cascade called GPT-J first and accepted its answer if the score was above 0.96, then tried J1-L with a threshold of 0.37, and only then called GPT-4.
The reported results: matching the best single model’s accuracy at 59% to 98% lower cost on the three datasets tested, or beating GPT-4’s accuracy by 4% at the same cost. Two caveats: the tasks had short answers (news classification, legal overruling detection, reading comprehension), where a small scorer can judge correctness well, and the models are from 2023. The method has aged better than the figures.
What did RouteLLM find?
RouteLLM (Isaac Ong and colleagues, 2024, published with the LMSYS team behind Chatbot Arena) takes the routing approach: decide before generating, between one strong model and one weak one.
Its routers learn from human preference data, roughly 65,000 pairwise comparisons from Chatbot Arena (where people vote on which of two answers is better), augmented with labelled MMLU questions and GPT-4-judged comparisons. The authors trained four kinds of router: similarity-weighted ranking, matrix factorization, a BERT classifier, and a causal LLM classifier. The strong/weak pair was GPT-4 (gpt-4-1106-preview) and Mixtral 8x7B.
The authors’ announcement reports cost reductions of over 85% on MT Bench, 45% on MMLU and 35% on GSM8K compared with sending everything to GPT-4, “while still achieving 95% of GPT-4’s performance.” The routers also kept working when the model pair was changed at test time, without retraining. The code is open source under Apache-2.0, and its threshold calibration is framed the useful way: you choose what share of traffic should reach the strong model, and the README recommends calibrating on queries that resemble your own.
The spread across benchmarks is the real lesson. Conversational requests (MT Bench) route down easily, and maths (GSM8K) mostly doesn’t. Your savings depend on your traffic, not on the paper’s.
How does an LLM router decide?
Four kinds of signal, often combined:
- Rules. Keywords, request length, task type, which tool is involved, or an explicit request from the user (“think hard about this”). Cheap and readable, but brittle.
- A learned classifier. A small model trained to predict whether the cheap model’s answer will be good enough, as in RouteLLM. It needs labelled data, ideally from your own traffic.
- The small model itself. Ask the cheap model to classify the request before answering it. Simple, but small models aren’t always good judges of their own limits.
- A check on the answer. The cascade approach: a scorer, a verifier, or a test run decides whether to escalate.
Whichever you use, the decision is a threshold on a score, and that threshold is a dial between cost and quality. The errors aren’t symmetric. An unnecessary escalation wastes some money. A hard request kept on the small model gets a weaker answer, and in a codebase that can cost a failed build or a revert, which is worth far more than the tokens saved.
Worked example: how much can routing reduce LLM API costs?
The prices below are hypothetical round numbers, chosen to make the arithmetic easy to follow. They are not any vendor’s price list. Substitute your own.
- Small model: $0.25 per million input tokens, $2.00 per million output tokens
- Frontier model: $5.00 per million input tokens, $25.00 per million output tokens
- Workload: 10,000 requests a day, each with 4,000 input tokens (the request plus retrieved context) and 500 output tokens
- Router: the small model reads the same 4,000 tokens and writes a 20-token decision
Per request, that comes to $0.002 on the small model, $0.0325 on the frontier model, and about $0.001 for the routing call. Sending everything to the frontier model costs $325 a day. Here is routing at four escalation rates:
| Share escalated | Router | Small-model answers | Frontier answers | Total per day | vs. frontier only |
|---|---|---|---|---|---|
| 10% | $10.40 | $18.00 | $32.50 | $60.90 | 81% less |
| 30% | $10.40 | $14.00 | $97.50 | $121.90 | 62% less |
| 50% | $10.40 | $10.00 | $162.50 | $182.90 | 44% less |
| 100% | $10.40 | $0.00 | $325.00 | $335.40 | 3% more |
Three things fall out of the table:
- The escalation rate is almost the whole story. The frontier column dominates the bill in every row. Routing pays off in proportion to how much of your traffic is genuinely routine.
- The router isn’t free. This one reads the full context, so it costs about $10 a day. A router that reads only the request (say 300 tokens) would cost about $1.15 a day, but it would decide with less information.
- A cascade lands in a similar place on cost. At 30% escalation, a cascade that answers everything on the small model first costs $20.00 + $97.50 = $117.50 a day before paying for the scorer. The difference is that the escalated 30% wait for two answers in sequence.
The table only counts tokens. It leaves out the cost of a wrong cheap answer, which is why the threshold should come from measured quality on your own requests and not from the bill alone.
How DawnLoop’s Reactor and Planner are designed to route
DawnLoop’s design includes a routing tier, and we’d rather be plain about what it is:
The routing tier is model routing. Well-understood, not invented here. The novel part is routing informed by the memory graph.
The design has two tiers. The Reactor is designed to run on a small, cheap model, answer familiar requests directly in under a second, and pass anything novel or complex onward. The Planner is meant to run on a frontier model and wake up only when the Reactor escalates. (The full five-agent picture is on how it works.)
The difference from a text-only router is the input. A typical router sees the words of the request. The Reactor is designed to also see the relevant corner of the memory graph: how often this kind of request has come up, how it turned out, and whether anything similar caused an incident. It should know this is the fortieth time you’ve asked. A request that looks hard in isolation can be routine for this team, and one that looks harmless can match a past revert.
Here is what that looks like in our prototype, as real output from its scripted demo, trimmed. With no model provider connected, the prototype falls back to a deterministic router: a few readable rules over the memory graph, no model call. So these decisions come from rules, not a trained router.
Day 1 — a working session
[Reactor] direct — memory graph shows a familiar pattern for this cue (3 supporting episodes)
[Reactor] escalate — cue contains a novelty/risk keyword (refactor) with no learned lesson for it — sending to the frontier tier
[Reactor] direct — memory graph shows a familiar pattern for this cue (5 supporting episodes)
[Reactor] escalate — no strong pattern in memory for this cue
[Reactor] escalate — cue contains a novelty/risk keyword (deploy) with no learned lesson for it — sending to the frontier tier
Day 2 — the graph has accumulated
[Reactor] direct — memory graph shows a familiar pattern for this cue (6 supporting episodes)
[Reactor] direct — memory carries a prior incident matching this cue — surfacing the learned lesson directly
The last request on day 1, “Deploy the auth changes straight to production,” escalated, and its outcome was marked as a failure. That night the prototype’s nightly pass retired a seeded belief that SSH deploys were fine and replaced it with a lesson from the failure. On day 2, “Is it safe to ship directly via SSH?” stayed off the frontier tier, because the lesson was already in memory. (How that overnight step works is covered in memory consolidation for AI agents.)
The fallback rules run in order: a matching remembered incident goes direct with the lesson attached; a risky keyword (refactor, migrate, deploy, incident and a few others) with no lesson behind it escalates; a familiar pattern (a matching belief, or at least two successful past episodes) goes direct; anything else escalates. With a live model connected, the prototype instead asks the small model to answer DIRECT or ESCALATE with a one-line reason, given the request and the retrieved memory context.
What we don’t know yet:
- Whether escalation rates fall as memory grows. That’s the design hypothesis: as more of a team’s requests become familiar, more should stay on the cheap tier. We intend to measure it, and can’t claim it until we have.
- Whether memory makes some routing mistakes worse. A request that looks familiar can hide a new twist. Keyword rules are crude, and a learned router will need its own evaluation.
- Whether the context is worth its cost. A memory-aware router reads retrieved context, which costs tokens. The design keeps that context small (at most 12 graph nodes in the prototype), and the direct answer needs the same retrieval anyway. That’s the context engineering argument: a large memory, a tiny working context.
Where DawnLoop fits
Routing addresses the daytime cost problem: keep routine work cheap and fast. The expensive work DawnLoop is designed around, consolidating what the day taught, is meant to run overnight when nobody is waiting. That’s the sleep-time compute idea, and the bet connecting the two is that better memory should leave more requests on the cheap tier.