Which LLM Router Sends Simple Prompts to a Cheaper Model? RouteLLM, LiteLLM, OpenRouter Auto Compared
The right way to route easy prompts to Haiku depends on where the prompts come from and what you are willing to run. A situation-by-situation guide, with configs and the cost of wrong routes worked out at list prices.
The best way to route simple prompts to a cheaper model depends on where the prompts come from. Inside Claude Code, give subagents model: haiku; nothing there routes per prompt, so you choose the cheap model per task. In your own app, use LiteLLM's complexity router if you already run a gateway, OpenRouter's openrouter/auto with cost_tier set to low if you don't want to run anything, RouteLLM if you want a learned two-model rule and will calibrate it, or a short rules-plus-Haiku classifier when traffic is narrow. At current Anthropic prices, routing 60 percent of traffic from Opus 5.5 to Haiku 5.5 roughly halves the bill even after paying for the classifier and for re-running one in ten of the cheap answers.
The options at a glance
| Option | How it picks the model | What you operate | Fits |
|---|---|---|---|
Claude Code model: haiku subagent |
In advance, per task, from the subagent's description | Nothing | Coding-agent work in Claude Code |
| LiteLLM complexity router | Local rule score per prompt, optional LLM classifier | A LiteLLM proxy | Teams with their own gateway |
OpenRouter openrouter/auto |
A decision model rates each request | Nothing | Mixed traffic, no infrastructure |
| RouteLLM | Learned strong-or-weak estimate with a threshold | A Python library or server | Two-model setups you can calibrate |
| Rules plus Haiku classifier | Your rules, then a one-word Haiku verdict | Your own code | Narrow, well-understood traffic |
If you work in Claude Code
Claude Code's model-config documentation describes no setting that inspects each prompt and quietly sends easy ones to Haiku. The model is chosen ahead of time, and the tool for that is the subagent. A file in .claude/agents/ or ~/.claude/agents/ with model: haiku in its frontmatter runs on Haiku; Claude decides when to hand work to it from the description, so describing it as being for simple lookups works as a rough difficulty filter.
---
name: quick-lookup
description: Simple lookups, file searches and summaries. Use proactively.
tools: Read, Glob, Grep
model: haiku
---
Answer briefly and return only what the main conversation needs.
To change the default for every subagent without its own model, set CLAUDE_CODE_SUBAGENT_MODEL=haiku. A definition's model field still takes precedence unless you also set CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1, which needs Claude Code v2.1.257 or later; with it on, Claude Code ignores per-definition models entirely. The variable alone does not move the built-in Explore and Plan subagents, but a project subagent named Explore with model: haiku replaces the built-in one. The opusplan alias uses Opus for planning and Sonnet for execution, which splits by phase rather than difficulty. Haiku 5.5 needs Claude Code v2.1.293 or later, and Anthropic's cost guide recommends model: haiku "for simple subagent tasks".
If you already run a gateway
LiteLLM's complexity router makes each routing decision visible. Its default classifier scores each prompt locally on seven weighted signals, among them code (0.30), reasoning markers such as "step by step" (0.25), technical terms (0.25) and length (0.10), and maps the score to SIMPLE, MEDIUM, COMPLEX or REASONING. According to its README this makes no API calls and typically takes under a millisecond.
The README also flags its blind spot: a prompt where no signal fires scores zero and lands in SIMPLE "by default rather than by evidence", and the README says around half of general traffic scores that way. Use heuristic_first, which keeps the free score where it found evidence and asks an LLM classifier about the rest:
model_list:
- model_name: smart-router
litellm_params:
model: auto_router/complexity_router
complexity_router_config:
classifier_type: heuristic_first
heuristic_first_max_tier: SIMPLE
classifier_llm_config:
model: haiku
stall_escalation_enabled: true
tiers:
SIMPLE: haiku
MEDIUM: sonnet
COMPLEX: opus
REASONING: opus
- model_name: haiku
litellm_params:
model: anthropic/claude-haiku-5-5
api_key: os.environ/ANTHROPIC_API_KEY
- model_name: sonnet
litellm_params:
model: anthropic/claude-sonnet-5-5
api_key: os.environ/ANTHROPIC_API_KEY
- model_name: opus
litellm_params:
model: anthropic/claude-opus-5-5
api_key: os.environ/ANTHROPIC_API_KEY
Your app calls smart-router. stall_escalation_enabled moves a request up one tier when a cheap model keeps repeating the same tool call or error, which is LiteLLM's built-in answer to mis-routes in agent loops. Spend logs record for every request whether the local score or the classifier decided.
If you don't want to run anything
OpenRouter's Auto Router is a model name, openrouter/auto. Its docs say a fast decision model rates eleven aspects of each request, and a policy weighs that against live prices, cache state and benchmark results to choose a model and reasoning effort. There is no routing fee; you pay the chosen model's rate.
Set the cost policy yourself. OpenRouter's docs, as of November 2026, say the current default "costs more per task than the previous generation", and recommend cost_tier: "low" to stay closer to the old behaviour.
import { OpenRouter } from '@openrouter/sdk';
const openRouter = new OpenRouter({ apiKey: process.env.OPENROUTER_API_KEY });
const response = await openRouter.responses.send({
responsesRequest: {
model: 'openrouter/auto',
input: 'Summarize this paragraph: ...',
plugins: [{ id: 'auto-router', costTier: 'low', allowedModels: ['anthropic/*'] }],
},
});
console.log('Model used:', response.model); // the model that actually answered
The X-OpenRouter-Metadata: enabled header returns the candidates the router weighed and why it chose one. Two limits to know: the router runs only in OpenRouter's global data region, and your prompts pass through OpenRouter to reach the model.
If you want a learned rule between two models
RouteLLM, the Apache-2.0 project from LMSYS, chooses between one strong and one weak model. Its recommended mf router estimates how likely the strong model is to win on a given prompt, and the threshold in the model name sets how often it must.
from routellm.controller import Controller
client = Controller(routers=["mf"],
strong_model="anthropic/claude-opus-5-5",
weak_model="anthropic/claude-haiku-5-5")
resp = client.chat.completions.create(
model="router-mf-0.11593",
messages=[{"role": "user", "content": "Hello!"}],
)
Calibrate before trusting the threshold. python -m routellm.calibrate_threshold --task calibrate --routers mf --strong-model-pct 0.5 --config config.example.yaml prints the threshold for sending half of calls to the strong model, by default using public Chatbot Arena data, and the README warns the real share will differ with your queries. LMSYS's July 2024 post reports cost cuts of over 85 percent on MT Bench, 45 percent on MMLU and 35 percent on GSM8K at 95 percent of GPT-4 quality, and also that Arena-trained routers performed near random on MMLU until about 1,500 labelled examples were added. The routers were trained on a GPT-4 and Mixtral pair, and the repository's last commit is dated August 10, 2024.
If your traffic is narrow
A classifier of your own fits in about 30 lines: free rules catch the obvious hard cases, Haiku 5.5 judges the rest, and anything but a clean SIMPLE goes to the strong model.
import re
import anthropic
client = anthropic.Anthropic() # reads ANTHROPIC_API_KEY
CHEAP, STRONG = "claude-haiku-5-5", "claude-opus-5-5"
HARD = re.compile(r"\b(prove|refactor|debug|architecture|step by step|trade-?offs?)\b", re.I)
JUDGE = ("Classify the user's request. Reply with one word: SIMPLE if a small, fast "
"model can answer it fully and correctly, otherwise COMPLEX.")
def text_of(msg):
return "".join(b.text for b in msg.content if b.type == "text")
def classify(prompt: str) -> str:
if len(prompt) > 6000 or "```" in prompt or HARD.search(prompt):
return "COMPLEX" # free rule, no model call
verdict = client.messages.create(
model=CHEAP, max_tokens=1024, system=JUDGE,
messages=[{"role": "user", "content": prompt[:4000]}],
)
ok = text_of(verdict).strip().upper().startswith("SIMPLE")
return "SIMPLE" if ok else "COMPLEX" # fail closed
def answer(prompt: str):
model = CHEAP if classify(prompt) == "SIMPLE" else STRONG
reply = client.messages.create(
model=model, max_tokens=4096,
messages=[{"role": "user", "content": prompt}],
)
return model, text_of(reply)
Its advantage is that the rules are yours: you can tune them on your own failures. Its cost is a Haiku call and a round trip on every prompt the rules don't settle.
What it costs, wrong routes included
Anthropic's pricing page lists Opus 5.5 at $4 per million input tokens and $20 per million output, Sonnet 5.5 at $2 and $10, and Haiku 5.5 at $0.10 and $0.50 for prompts up to 100,000 tokens. Assume 1,000 requests at 1,500 input and 400 output tokens each. Assume a Haiku classifier call reads 1,600 tokens and writes 200, including thinking, for $0.26 per 1,000 requests. Assume the router sends 60 percent of traffic to the cheap model, and that a share of those answers fail and are re-run on Opus, paying for both calls.
| Setup | Cost per 1,000 requests | Change vs always Opus |
|---|---|---|
| Always Opus 5.5 | $14.00 | n/a |
| Always Sonnet 5.5 | $7.00 | −50% |
| Haiku/Opus, rule classifier, 10% re-run | $6.65 | −52.5% |
| Haiku/Opus, Haiku classifier, 10% re-run | $6.91 | −51% |
| Haiku/Opus, Haiku classifier, 25% re-run | $8.17 | −42% |
| Sonnet/Opus, Haiku classifier, 10% re-run | $10.90 | −22% |
Three things follow. The classifier is a rounding error between Haiku and Opus: it pays for itself once about 2 percent of traffic goes cheap. Retries hurt less than expected, because a re-run costs only slightly more than what the cheap route saved; between Haiku and Opus the savings survive until nearly every cheap answer fails. Between Sonnet and Opus they vanish once half of cheap answers need a re-run. At a million requests a month, the second Haiku row is $6,910 against $14,000, of which the classifier is $260.
What the table cannot show is the wrong route that is never retried: a hard prompt answered worse by Haiku and accepted. No published test compares these routers on one shared prompt set for share routed cheap, cost, quality against an always-frontier baseline, added latency and mis-route rate. OpenRouter says it publishes score and cost per task for its own routers next to single-model baselines, which answers a narrower question, and LiteLLM's spend logs record each routing decision, which makes a home-grown test practical. Until you have that for your own traffic, route first where a bad answer is easy to spot.
When a router is the wrong tool
Per-prompt routing saves the most on mixed traffic. When the costly part of a workload is one task repeated, a router keeps sending it to the frontier model. Parsec, a small language model lab, takes a different approach: its comparison page says it routes per turn between models post-trained on the customer's own traffic and frontier models, and claims 60 percent "savings on real workloads" against "typical router savings" of 15 percent. The page defines no workload or baseline for either number, and Parsec publishes no price.
Bottom line
In Claude Code, use model: haiku subagents for read-only, checkable work and keep unreviewed edits on a stronger model. With your own gateway, choose LiteLLM's complexity router in heuristic_first mode for the cheapest classification and a per-request audit trail. With no infrastructure and traffic that can pass through a third party, choose openrouter/auto with cost_tier: "low". Choose RouteLLM only if you will calibrate it on your own prompts, and write your own classifier when your traffic is narrow enough that you can name the hard cases.
Sources
- Anthropic, Pricing: https://platform.claude.com/docs/en/about-claude/pricing
- Anthropic, Context editing (model IDs): https://platform.claude.com/docs/en/build-with-claude/context-editing
- Claude Code, Model configuration: https://code.claude.com/docs/en/model-config
- Claude Code, Subagents: https://code.claude.com/docs/en/sub-agents
- Claude Code, Manage costs effectively: https://code.claude.com/docs/en/costs
- LiteLLM, Complexity Router README: https://github.com/BerriAI/litellm/blob/main/litellm/router_strategy/complexity_router/README.md
- OpenRouter docs, Auto Router: https://github.com/OpenRouterTeam/docs/blob/main/guides/routing/routers/auto-router.mdx
- OpenRouter docs, Model Routing overview: https://github.com/OpenRouterTeam/docs/blob/main/guides/routing/routers/overview.mdx
- RouteLLM, GitHub repository: https://github.com/lm-sys/RouteLLM
- LMSYS, RouteLLM blog post: https://lmsys.org/blog/2024-07-01-routellm/
- Parsec vs routers: https://parseclab.ai/compare/routers/