Choosing Models
The proprietary landscape (Claude / GPT / Gemini), capability vs cost vs latency, reasoning models, model routing.
Prerequisites
- Tokens & Context Windows — pricing and context limits are token mechanics first.
- LLM APIs — caching, batch, and usage fields change the real cost of a model choice.
- Evals and Testing — model selection is an eval problem, not a leaderboard problem.
- Cost — routing and tiering are the largest structural cost levers after caching.
The intuition
Picking a model is less like buying the "best" laptop and more like staffing a help desk. You would not put your most expensive senior on every password-reset ticket — and you would not leave a junior alone on a multi-system incident. You staff by difficulty of the work, not by prestige of the title.
Frontier models clear the hardest tasks but cost more and are wasted on easy traffic. Mid-tier and cheap/fast models handle the bulk once the task is in bounds. The durable skill is building a small eval set, proving the task is solvable, walking down the price ladder until quality drops below your bar, and routing each request to the cheapest model that still clears it.
Key insight
Model choice is a requirements problem, not a leaderboard problem. Benchmarks shortlist candidates; your own eval set decides. The ranking that matters is "cheapest model that passes our quality bar on our traffic" — and that ranking shifts every release cycle.
Why it exists
Without a framework, teams settle into bad equilibria. Always frontier burns a multi-fold premium on easy traffic. Always cheapest fails fluently on multi-step tool use and hard extraction. Chase the leaderboard ships on a public score that does not predict your schema adherence, RAG faithfulness, or tool-loop reliability.
Four constraints force a real process. Capability is task-specific. Price and latency are multi-dimensional — input vs output rates diverge, reasoning modes bill thinking tokens (internal chain-of-thought) at output rates, long-context surcharges kick in above ~200K on some providers, and cache or batch can change the bill by roughly 10× or 2×. The landscape rots weekly, so the process must survive: eval → walk down → route → re-run on version bumps. Hard constraints (residency, retention, quotas, SLA) can veto a model that wins every benchmark. Choosing models exists so cost, latency, and quality are deliberate per route.
The core idea
Evaluate along six axes: capability (on your eval set), cost (input vs output per million tokens), latency (TTFT and tokens/sec; reasoning adds seconds-to-minutes before visible output), context length, modality (vision, audio, PDF), and constraints (residency, retention, quotas, SLA).
The sequence is fixed: prove solvability on a strong model → build a small eval set from real traffic → walk down the price ladder until quality drops below the bar. Most production traffic lands on mid-tier models because the frontier premium only pays for the hardest slice — typically the top 10–20%. That is why model routing exists: send each request to the cheapest tier that still clears quality. Two facts change implementation: public benchmarks mislead (contamination, task mismatch), and reasoning / extended thinking is a per-request dial — enable high effort only where multi-step correctness moves your metrics.
How it actually works
Every provider lineup is a three-tier ladder — frontier, workhorse, cheap/fast — plus optional open-weight APIs that undercut proprietary tiers. Names and dollars change; the ladder and the process do not.
The landscape as of August 2026
Prices are illustrative, per million tokens (input/output), from provider docs around August 2026. Re-check before any budget decision; this table ages in weeks.
| Provider | Frontier | Workhorse | Cheap/fast |
|---|---|---|---|
| Anthropic | Claude Fable 5 — $10/$50, 1M ctx, adaptive thinking always on | Claude Opus 5 — $5/$25; Claude Sonnet 5 — $3/$15 (intro $2/$10 through Aug 2026), both 1M ctx | Claude Haiku 4.5 — $1/$5, 200K ctx |
| OpenAI | GPT-5.6 Sol — $5/$30; GPT-5.5 Pro — $30/$180 (deep tier) | GPT-5.6 Terra — $2/$12 | GPT-5.6 Luna — $0.20/$1.20; all ~1M ctx |
| Gemini 3.1 Pro — $2/$12 ($4/$18 above 200K input) | Gemini 3.5 / 3.6 Flash — ~$1.50 / $7.50–$9, 1M ctx | Flash-Lite tiers — ~$0.25–$0.30 / $1.50–$2.50 | |
| Open-weight via API | DeepSeek V4 Flash ~$0.14/$0.28 — roughly an order of magnitude below proprietary mid-tier |
Mechanics beyond sticker price. Output usually costs several times input (cost). Cached input is ~10× cheaper; batch APIs roughly half off (LLM APIs). Long-context is not flat-priced: Gemini 3.1 Pro doubles above 200K input; OpenAI flagships use higher long-context rates (older GPT-5.x still documents a ~272K threshold). Rankings shift every release — defend the framework, not a snapshot.
Common misconception
Treating the August 2026 table as durable truth. Names, intro discounts, and even which tier is "workhorse" move monthly. Pin the process (eval → walk down → route → re-eval on version bumps). Re-fetch prices from provider docs before any capacity or budget decision.
Reasoning / extended thinking
The model generates a (usually hidden or summarized) chain of thought, billed at output-token rates, then emits the visible answer. Cost is dominated by tokens you never show; latency grows from hundreds of ms to seconds or minutes; quality improves on multi-step work (math, debugging, planning, agent loops) — not lookups or classification.
APIs expose this as a dial: Anthropic adaptive thinking + effort, OpenAI reasoning_effort (none through max), Gemini thinking budgets. Worth it for agentic coding, complex extraction, plan-then-execute. Not for classification, simple RAG, or latency-sensitive chat. A/B on your eval set, per route (latency).
Key insight
Reasoning is a per-request dial, not a permanent model upgrade. Enable high effort only where multi-step correctness moves your metrics enough to pay for thinking tokens at output rates. Default-on thinking for FAQ traffic is a pure cost and latency tax.
Why leaderboards mislead
Public scores shortlist; they do not ship. Contamination (benchmark items leak into training data), task mismatch (MMLU does not predict your JSON extraction or agent loops), and Arena rankings (pleasing single-turn chat, not domain correctness) all mislead. Instead: 50–200 examples from real traffic, graded rubrics, re-run on every candidate and version bump (evals and testing).
Model routing in practice
Three patterns cover almost all systems. Static routing maps request type to model ID — zero added latency. Dynamic routing scores difficulty with a small classifier (or cheap LLM call) and escalates the hard tail (~100ms). Cascade / fallback tries cheap first, validates (schema, judge, confidence), and retries stronger only on failure — only when failure is cheap to detect. Fluent wrong answers need better retrieval or prompts, not infinite escalation. FrugalGPT-style cascades formalize this: cheaper first, stop when quality is enough.
Keep the provider abstraction thin so a routing-table change is not a code change. Caches are per-model: bouncing between models never warms a shared cache. Gateway: design an LLM gateway. Self-hosted tiers: open source & self-hosting.
The flows
| Flow | Sequence | When | What breaks it |
|---|---|---|---|
| Feasibility first | Frontier on real examples → prove solvable → optimize | New feature, unknown ceiling | Jumping to cheap and concluding "LLMs can't" |
| Walk-down selection | 50–200 cases → frontier → workhorse → cheap → stop above bar | Default model per route | No held-out set; scoring the examples you tuned on |
| Static route table | Request type / flag → model ID | Stable, classifiable traffic | Mis-labeled types; one default for the whole app |
| Dynamic difficulty | Cheap classifier → pick tier → optional escalate | Mixed traffic with a hard tail | Classifier bias toward frontier |
| Cascade / validate-up | Cheap → schema/judge → on fail, stronger model | Failure is detectable cheaply | Undetectable failures; unbounded loops |
| Thinking dial | Route chosen → raise effort only if multi-step eval demands it | Agentic coding, hard extraction | Default-max thinking on FAQ/RAG chat |
| Version migrate | Deprecation → same eval on successor → canary → cut over | Pinned IDs retire every ~6–18 months | Auto-updating aliases with no canary |
A worked example
Consider the governed enterprise platform: policy Q&A, multi-step tool use, and agentic writes with human approval. Scale: ~10–15k daily users, mixed difficulty.
Prove solvability. Run ~80 real tickets on a strong model with full tools. Suppose 92% pass a graded rubric (correct citation, correct action proposal, no policy invention). Solvable; now optimize.
Build the eval set. Hold out ~120 examples: 70 FAQ, 30 multi-doc synthesis, 20 tool-use / write-path. Exact match on structured fields; LLM-as-judge on grounded prose. Never reuse this split for prompt tuning.
Walk down (illustrative mid-2026 price classes — re-check before budgeting):
| Route class | Share | Candidate | Pass rate | Decision |
|---|---|---|---|---|
| FAQ / single-policy lookup | ~70% | Cheap/fast (Haiku- or Luna-class) | 94% | Ship on cheap |
| Multi-doc synthesis | ~20% | Workhorse (Sonnet / Terra / Flash) | 91% | Ship on workhorse |
| Tool-use / agent write path | ~10% | Frontier + thinking dial | 88% medium; 93% high | Frontier + high effort only here |
Router. Static map by intent (FAQ → cheap; "needs tools" → frontier). Optional cascade: if cheap fails schema or citation check, retry once on workhorse. Log route, model_id, tokens, cascade_hit.
Bill shape. At 10k requests/day, all-workhorse (~$3/$15 class, ~8k in + 400 out) is roughly ~$0.03/request → ~$300/day. Routing ~70% to cheap and thinking only on ~10% often cuts blended cost well below half — if evals stay above bar. Luna-class is far cheaper than Haiku-class; the win shape is routing + selective thinking.
What each omitted stage looks like in production
- No feasibility pass → concludes "impossible" when a mid-tier prompt was the problem, or ships on cheap and blames under-capability on hallucination.
- No own eval set → model swaps become Arena arguments; regressions ship as "feels better."
- Single model for the app → frontier invoice or quality collapse on the hard 10–20%.
- Cascade without a stop → a broken validator sends everything to frontier.
- Thinking always on → FAQ TTFT jumps multi-second; bill tracks invisible thinking tokens.
- Auto-updating alias → silent verbosity/tool-call drift overnight (reliability, observability).
Production concerns
Deprecations are your problem. Providers retire models on roughly 6–18 month cycles. Pin exact model IDs, subscribe to notices, keep the eval set ready so migration is a re-run — not a research project.
Version drift is silent. Same-name updates shift verbosity, tool-call rate, refusals. Re-run evals on every change; never point prod at an auto-updating alias without a canary (evals and testing).
Measure cost or it does not move. Log input, output, cached, and (when exposed) thinking tokens per request and route. The common bug is a bloated prompt found only on the invoice (cost, observability). Quotas are per-model, so cheaper routes are also different rate-limit pools — useful overflow during spikes (reliability). Multi-provider fallback is not an SDK swap: keep a second provider eval-verified and budget prompt re-tuning. Residency can veto capability regardless of eval score (security, open source & self-hosting).
Common drill-downs
How would you choose a model for a new feature? Prove feasibility, build an eval set from real examples, walk down until quality drops. Choose per-route, not per-app; re-evaluate when the landscape shifts.
When is extended thinking worth it? Multi-step, correctness-sensitive work only. Never for classification or simple RAG — thinking tokens bill at output rates.
How do you cut cost without hurting quality? Route easy traffic cheaper first, then cache stable prefixes, trim prompts, batch async work, then distill a narrow high-volume route (fine-tuning).
What breaks on a model swap? Tone, tool-call eagerness, JSON quirks, refusals, token counts (different tokenizers), cache invalidation. Treat it as a deploy: eval + canary.
What does "1M context" buy you? Ability, not advisability. Mid-window recall degrades; cost and prefill latency grow; some providers surcharge past ~200K. RAG over a curated subset usually wins; reserve long context for holistic tasks.
Test yourself
A product lead says 'just use the top model on the Arena leaderboard for everything.' What three concrete failures does that create, and what do you propose instead?
Your FAQ route costs 4× what the price table predicted. Thinking is at max effort; average output usage is huge while visible answers are short. What is going on?
You cascade cheap → workhorse → frontier on any low judge score. Latency p95 exploded and cost rose. Diagnose the design flaw.
A '1M context' model is available. An engineer wants to drop RAG and stuff the policy corpus into the window. What do you push back with?
Provider deprecates your pinned workhorse in 90 days. What is the migration checklist that does not become a research project?
Go deeper
- Anthropic — Models overview — Claude tiers, adaptive thinking.
- OpenAI — Models — Sol / Terra / Luna and reasoning-effort.
- OpenAI — Pricing — input/output, cache, batch, long-context.
- Google — Gemini API models — stable/preview lineup.
- Google — Gemini API pricing — thinking tokens and long-context tiers.
- Artificial Analysis — Models — independent intelligence, price, speed comparison.
- Arena (formerly LMArena) — pairwise rankings; shortlist only.
- FrugalGPT (Chen, Zaharia, Zou) — cascade: cheaper first, stop when good enough.
- [1hr Talk] Intro to Large Language Models — Andrej Karpathy — mental model for these systems.
Where this connects
- Open source & self-hosting — when the "model" is a GPU you operate; the same routing table can span API and self-hosted tiers.
- Fine-tuning — after routing and caching, distillation is the next cost/latency lever for narrow high-volume routes.
- Cost — tiering, caching, and batch make model choice show up on the bill.
- Design an LLM gateway — multi-model access, quotas, audit, and routing as a platform concern.