← Back to blog

LLM Model Selection & Routing: How to Pick the Right Model and Mix Cheap + Powerful Calls (2026 Guide)

The same request costs 20x more on a flagship model than on a small one — so model selection is not about picking the strongest model, it is about picking the cheapest model that is good enough. Model routing dispatches every request by difficulty to the right-sized model, combining 80% cheap traffic with 20% premium traffic to approach flagship quality at a fraction of the cost. This guide covers three things: the LLM cost structure (why context bloat is the most expensive silent killer), a capability-cost matrix for selecting models, and three routing strategies in production (rule-based, semantic, and cascade) plus the two caching levers — Prompt Caching and Semantic Caching — and ends with an actionable selection and routing checklist. [Model selection assessment →]

Bottom line first: the biggest model-selection mistake is “pick the strongest”

The same request costs 20x+ more on a flagship-class model than on a well-chosen small model — yet switching 100% of traffic to small models breaks quality. Real engineering is neither “pick the strongest” nor “pick the cheapest”. It is:

Tier requests by difficulty, and let every request go through the “cheapest model that is good enough”. This mechanism is model routing, and in 2026 it is the engineering lever worth doing first for enterprise AI cost control — more than any other.

This guide covers three things: where the money goes (the LLM cost structure), how to pick models (capability-cost matrix), and how to ship routing (three strategies + two caching levers + an executable checklist).


1. Where the money goes: the LLM cost structure and three multipliers

Before routing, understand how the bill is actually burned. An LLM call costs input-token rate × input size + output-token rate × output size — and in practice three factors amplify the bill by multiples to tens of multiples:

1.1 Context bloat: the most invisible money burner

The real token composition of one RAG Q&A:
System prompt (fixed)            ~800 tokens
Retrieved knowledge chunks       ~2,000–8,000 tokens
Conversation history (accumulates) ~1,500 × N turns
User question (tiny)             ~100 tokens

In most AI applications, the user question is under 5% of the input; everything else is context. Input tokens are recomputed on every request (unless cache hits), so the bill inflates fastest when context is long, concurrency is high, and conversation turns stack up.

1.2 Model-spec mismatch: using a cannon for a mosquito

ScenarioModel actually neededCommon misconfiguration
Keyword classification, form extractionSmall model (7B–32B class)Everything to flagship
Summarization, rewriting, translationMid-tier modelEverything to flagship
Complex reasoning, code generationFlagship model— (correct)
Structured output (JSON extraction)Small model + strong constraintsEverything to flagship

Routing 100% of traffic to a flagship model is paying 20x to complete 80% of tasks that small models handle fine.

1.3 Missing caches: paying repeatedly for the same content

The same system prompt, the same document prefix, the same intent — without caching, every occurrence is fully re-billed.

The three multipliers stacked together are the real source of “AI is expensive”. Routing + caching are the engineering answers to exactly these three factors.


2. How to pick models: the capability-cost matrix and a four-step method

Routing presupposes a capability-cost baseline per task class × per model. Without it, routing is guesswork.

2.1 Tier your tasks into four levels

TierTask typeExamplesSuggested model class
L1 MechanicalFormatting, extraction, mappingJSON field extraction, intent classification, content filteringSmall (distillable)
L2 LinguisticRewriting, summarization, translationCustomer-service phrasing, meeting notes, email draftsMid-tier
L3 UnderstandingRetrieval Q&A, document analysisRAG Q&A, contract key-point extractionMid-tier to flagship
L4 ReasoningMulti-step reasoning, coding, planningAgent planning, hard bug localization, long-form argumentationFlagship

Pick a granularity that fits your real load: 3–4 tiers cover 80% of cases — do not tier for the sake of tiering.

2.2 Four-step selection: evaluate first, grade second, lock in third

Step 1 Sample: pull 200–500 representative samples from real business traffic (cover every task class)
Step 2 Evaluate: run the samples through candidate models (large/mid/small) and score against YOUR quality bar
Step 3 Grade: for each task class, find the cheapest model that passes → this is your routing map
Step 4 Lock in: codify the map into routing config; re-evaluate monthly and adjust

The key: “good enough” is defined by your evaluation, not by vendor leaderboards. Leaderboards measure general intelligence; your business measures specific tasks — extraction accuracy, format compliance, tone consistency. Those are measurable on business samples, and invisible on leaderboards.


3. How to ship routing: three strategies and how to choose

With the map in hand, the remaining question is “how does each request reach the right model”. Three strategies, from simple to sophisticated:

3.1 Rule-based routing: do this first

Lightest, most deterministic, most explainable. Route on stable, available signals:

By endpoint/service   /api/classify → small     /api/agent/plan → flagship
By field/parameter    task=extraction → small   needs code gen → large
By user/tier          free tier → mid           enterprise → flagship
By context length     context < 4K → small      > 32K → large (big window)

When to use: business endpoints are clearly separated and task types are naturally sharded. 90% of teams should start with rule-based routing — small change, zero extra cost, immediate effect.

3.2 Semantic routing: when rules cannot cover it

The blind spot of rules: task type is not in a field, it is in the semantics. One customer-service entry may receive “how do I get an invoice” (simple) and “help me analyze why orders dropped this quarter” (complex).

Semantic routing vectorizes both “intent templates” and the user request with embeddings, computes similarity, assigns the request to the best-matching task class, and dispatches by that class’s model tier.

Intent template store:
  intent: invoice/order lookup        → L1 small  (vector: v_orders)
  intent: after-sales/refund          → L2 mid    (vector: v_after_sale)
  intent: data analysis/advice        → L4 flagship (vector: v_analysis)

Request → embedding → cosine similarity vs templates → best intent → that model

When to use: unified entry with mixed intents (one conversation entry serving many task types). Semantic routing requires maintaining the intent-template store as the business evolves — that is its main cost.

3.3 Cascade routing (Model Cascade): the best quality safety net

The previous two are “dispatch”; cascade is “start cheap, escalate only when needed”:

Request → small model answers
        ├─ quality check passes → return (save ~80%)
        └─ quality suspect → escalate to mid-tier
                           ├─ passes → return
                           └─ still suspect → escalate to flagship → return

How to detect “quality suspect” is the engineering core of cascade routing. Three common approaches:

ApproachHowPros / cons
Structured self-checkModel outputs answer + confidence/self-check fieldCheap, easy; small models may be overconfident
Rule validationJSON Schema validation, required-field presence, format regexDeterministic; only covers formalizable quality
Discriminator modelA small classifier judges whether the answer passesBest quality; needs training/labeled data

When to use: answer quality directly affects the business (customer-service replies, generated content) and you can reserve budget for occasional escalation. Cascade pulls average cost down near the small model while keeping worst-case quality at flagship level.

3.4 How to choose: three sentences

  • Endpoints naturally sharded → rule-based routing; do it first, live in a day.
  • Unified entry, mixed intents → add semantic routing on top of rules.
  • Quality-sensitive, needs a safety net → add cascade routing (escalation checks + fallback chain).
  • The right path for most teams: rules → semantic → cascade, each step built on the evaluation baseline from the previous one.

4. Two cost levers: Prompt Caching and Semantic Caching

Routing solves “which model”; caching solves “can we skip a computation”. The two caches live at different layers and stack.

4.1 Prompt Caching: vendor-side KV cache, smallest change

Model vendors (OpenAI/Anthropic/DeepSeek, etc.) offer caching for repeated requests with the same prefix: the same system prompt or long document prefix bills at the cache-hit rate (typically 10%–25%) from the second request on.

Fits: long-context workloads (hundreds-of-pages Q&A, long system prompts, multi-turn fixed prefixes)
How: keep constant context in the prompt "prefix", put varying content after it
Upside: input-token cost down 75%–90% (per vendor cache pricing)
Barrier: near zero — most vendor SDKs apply it automatically; just keep the prefix stable

Engineering note: structure prompts as “static first, dynamic last” — fixed content (system prompt, knowledge docs) in front, changing content (user question) behind, to maximize cache hits.

4.2 Semantic Caching: application-side cache, skips the call entirely

Requests with the same or similar intent return the stored answer — no model call happens at all.

Request → semantic dedup (embedding similarity > threshold) → hit → return stored answer
                                                              └ miss → call model → write cache
DimensionPrompt CachingSemantic Caching
LocationVendor sideApplication side
SavesRecomputed input-token costThe entire call
Hit conditionSame prefixSemantic similarity
Consistency riskNone (vendor-managed)Real (answers can go stale)
FitsLong context, fixed prefixesStable answers, low time-sensitivity (FAQ, knowledge Q&A, standard phrasing)

Engineering note: the core of Semantic Caching is invalidation — when knowledge updates, prices change, or inventory moves, cached answers can go stale. Common practice: version the cache key (knowledge version +1 invalidates), shorten TTL on hot entries, and skip the cache entirely for sensitive categories.


5. Actionable checklist: 5 steps to start model routing today

StepWhatOutputTime
1. Understand the billPull the last 30 days of call details, group by endpoint/task, compute token-cost share per classCost distribution table (find which 20% of traffic causes 80% of cost)0.5 day
2. Build the eval baseline200+ real samples per task class, run small/mid/large models, record quality scoresCapability-cost matrix (optimal model per task class)2–3 days
3. Ship rule-based routingRoute high-share simple traffic to mid/small models by endpoint/fieldCost drops 30%–50% immediately (depends on distribution)1 day
4. Add Prompt CachingRestructure prompts to “static first, dynamic last”, verify hit rate75%+ input-cost cut on long-context workloads0.5–1 day
5. Upgrade on demandAdd semantic routing for mixed intents; cascade + Semantic Caching for quality-sensitive pathsAverage cost approaches small model, worst case holds flagship lineOngoing

Ongoing companions: monthly eval re-runs (task distributions and model capabilities drift), a cost-attribution dashboard (split by task type / model / cache hit rate), and re-running the baseline when new models launch (model iteration is fast — a semi-annual selection review pays for itself).


6. Three common pitfalls

  1. Routing without an eval baseline — routing config becomes guesswork; you save money but quality collapses, then you flip everything back to flagship. Wasted effort;
  2. The routing layer becomes a single point of failure — if routing dies, the business dies. Routing needs a degradation policy (fall back to flagship when routing is unavailable, instead of failing outright);
  3. Cutting cost without attribution — no cache-hit rate, no per-model cost split, so you cannot tell whether you saved anything. Cost attribution must ship together with routing.

Further reading:

Model routing is the engineering dividing line between an AI app that “runs as a demo” and one that “saves money in production”: in a demo, every request goes to the same model; in production, every request goes to the model it should. Routing + caching is the most certain engineering move for enterprise AI cost control in 2026 — no model swap, no business rewrite. Get the traffic tiers and caches right, and the bill comes down for real.

We build the full AI engineering delivery chain: cost-structure and call-profile analysis, task tiering and evaluation baselines, model routing (rules/semantic/cascade) design and delivery, Prompt/Semantic caching implementation, and post-launch cost-attribution dashboards. If you are wrestling with “AI is affordable but the bill keeps growing”, bring us your call details — we do not promise to do everything, only what we are good at.

FAQ

Should I pick the most capable model or the cheapest one?

Neither. The correct framing is "the cheapest model that is good enough": first tier your tasks by complexity — simple tasks (classification, extraction, rewriting, summarization) go to cheap small models, while complex tasks (reasoning, coding, long-document analysis) go to flagship models. "Good enough" is decided by evaluation, not intuition: run a quality eval on real business samples, and only escalate tasks that fail. In most real workloads, simple tasks make up 60%–80% of traffic — that is exactly the basis on which model routing saves money.

What is model routing and can it really cut costs by 50%+?

Model routing dispatches each request by its characteristics to the most suitable model: rule-based routing (by keyword/endpoint/field), semantic routing (embedding-based intent matching), or cascade routing (start small, escalate only when quality is insufficient). How much you save depends on the task distribution: if simple tasks dominate, splitting traffic that used to go 100% to flagship into an 8:2 mix can cut overall cost by 50%–80% while keeping complex-task quality unchanged. The precondition is a task taxonomy and an evaluation baseline — without them, routing is guesswork.

What is the difference between Prompt Caching and Semantic Caching — which saves more?

They cache at different layers. Prompt Caching is the vendor-side KV cache: repeated requests with the same system prompt or long document prefix are billed at the cache-hit rate, saving the cost of recomputing input tokens — most effective for long-context workloads (hundreds of pages). Semantic Caching is an application-side cache: requests with the same intent return the stored answer without any model call at all, saving the entire invocation. Prompt Caching is a smaller change with deterministic returns (usually the first thing to do); Semantic Caching has bigger upside but requires cache-invalidation strategy, and suits scenarios with stable answers and low time-sensitivity.

What should I watch out for when adding routing to my own agent system?

Three points: ① Build an evaluation baseline before routing — without quality data you have no safety boundary for cost savings; score each model per task class on real samples first. ② Routing needs a fallback chain — when a small model output is not good enough, escalate to a larger model (cascade), and the whole path needs timeouts and degradation policy so a routing failure cannot take the business down. ③ Cost attribution must be observable — split token cost and cache hit rate by task type, model, and call volume; otherwise you cannot tell whether you saved anything or where.

When should I NOT do model routing?

Skip it in three cases: ① Tiny traffic (a few hundred calls a day) — the maintenance cost of the routing layer exceeds the savings; ② All tasks are complex (deep reasoning across the board) — there is no cheap traffic to route, so routing has no point; ③ Uniformly high compliance/quality requirements (e.g. medical diagnosis, financial risk decisions) — multi-model introduces extra evaluation and compliance cost for the sake of saving money. In one sentence: routing pays off only when your tasks have a clear difficulty spread.

This article comes from AI Enable Harness front-line delivery practice. Need a similar system or optimization service?

📡 Also published on: CSDN 知乎

Subscribe to Updates

Get notified when new articles are published. No spam, occasional updates only.

Subscribe →