Lesson 8 of 13 · 15m
Model Choice Is a Routing Table
Pick by your own evals at the cheapest tier that passes, pin dated snapshots, and escalate the hard tail to frontier.
The model picker in your config is a routing table, not a trophy shelf. Every call you ship gets a capability tier, a price, and a latency profile, and the correct answer is almost never "the biggest one for everything".
Benchmarks are marketing until proven otherwise
MMLU, HumanEval, GPQA — the public benchmarks saturate and get contaminated. Once a benchmark is public it leaks into training data and gets Goodharted: scores climb while real-world deltas shrink. LMSYS Chatbot Arena's human-vote Elo is harder to game but measures preference — including style and sycophancy — not correctness on your task. The only benchmark that predicts your feature's behavior is your own fixture set: run the same 50–200 cases against the candidate models and let your data pick. The evals lesson builds that set.
What actually differs
- Capability tiers. Frontier models (GPT-5-class, Claude Sonnet/Opus, Gemini Pro) handle multi-step reasoning and ambiguous instructions; small models (mini-tier, Haiku, Llama 8B-class) handle extraction, classification, and format conversion at 10–20× lower price. Most real traffic is easy work.
- Latency. Small models decode faster and sit under interactive thresholds; frontier decode is where p95 goes to die.
- Context and features. Window size, structured-output support, tool calling, and prompt caching differ per model and per provider. Check the feature matrix, not the vibes.
- Data terms. Zero-retention endpoints, regional processing, and fine-tuning rights vary by provider and tier. That's an engineering constraint when you handle regulated data — or the reason the self-hosting lesson exists.
Pin the version
gpt-4o is an alias that moves. gpt-4o-2024-08-06 is a snapshot that doesn't. Providers deprecate dated snapshots on published schedules — OpenAI emails the timeline months ahead — and occasionally adjust aliased weights underneath you. A silent alias upgrade is a silent regression: same endpoint name, different failure modes, no diff in your deploy. Pin dated versions in production config, subscribe to deprecation notices, and re-run your eval suite before moving a pin. The seed parameter and temperature: 0 reduce variance; neither makes an unpinned alias reproducible.
The selection procedure
Concretely: pick two or three candidate models spanning the tiers, run your golden set against each, and chart accuracy against per-call cost. The knee of that curve is your default. The exercise takes an afternoon and replaces a week of arguing about which model "feels smarter" — and it produces the exact artifact finance asks for later.
Route by difficulty
The pattern that survives finance review:
- Default every call to the cheapest model that passes your evals.
- Give the small model an explicit escalation path — a
confidencefield, a"cannot_classify"output, a validator that rejects ambiguous answers. - Send the genuinely hard tail to the frontier tier.
On typical classification and extraction workloads, 70–90% of calls never need the big model. That ratio is your margin — and it's also a quality instrument: if the escalation rate doubles, either traffic changed or the small model is degrading. Both are findings.
Field notes
- Self-hosted open weights change the math entirely — fixed hardware cost instead of per-token billing. The deployment lesson covers when that trade wins.
- "Fine-tune a small model to beat a big one" is a real pattern for narrow tasks; the fine-tuning lesson draws the line.
- Track quality per model per task in your evals. A model that wins on extraction can lose on refusal handling.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
Build Your Own AI Agent Stack: The Complete Self-Hosted Guide for 2026
Build a production-grade self-hosted AI agent from scratch using Docker Compose. Covers the full stack — Ollama, n8n, Flowise, Qdrant, SearXNG, Langfuse, and Redis.
AI Agents Are Breaking the Internet — And Nobody's Ready for the Bill
ChatGPT went down 28,000-report strong in February 2026. Claude had back-to-back outages within 24 hours in March. GitHub logged 37 incidents in a single month and is running at 90.21% uptime — one nine, not three. AI agents aren't just using infrastructure.
OpenClaw: The Lobster That Broke the Internet, Burned Through Every LLM's Compute Budget, and Started a War Between Anthropic and OpenAI
A retired Austrian developer built an open-source AI agent for fun in November 2025. Within 90 days, Jensen Huang called it the most successful open-source project in human history.
How AI Actually Works in Modern Video Games: FSMs to LLMs
Game AI isn't intelligent. It's state machines, search, and scoring arranged to feel like judgment, with real, runnable code from FSMs to local LLM dialogue.