I tracked my Claude Code spending for three months. The finding that changed everything: 60-70% of agent turns don't need a frontier model.
File reads. Grep commands. Test reruns. Simple edits from a clear spec. These tasks produce identical results on Haiku as they do on Opus — but at 1/60th the cost.
The Numbers That Convinced Me
Month 1 (all Opus, no routing): ~$10,200
Month 3 (task-level routing): ~$3,100
Same codebase. Same velocity. Same code quality on the work that matters.
Why This Is Happening Now
This week alone, three new routing tools launched:
- Ramp Router (by Ramp, the fintech company) — OpenAI-compatible endpoint that routes per request
- Entelligence Model Router — picks the model per agent turn, benchmarked against direct Opus on Terminal Bench
- Frugal (open source) — Claude Code hooks that delegate subtasks to cheaper tiers
Add these to existing options like LiteLLM, OpenRouter, and Portkey, and routing is clearly becoming a category, not a feature.
The fact that a fintech company, an AI startup, and an open-source dev all shipped the same idea within days tells you something: the single-model-per-session paradigm is breaking down.
The Three-Tier Model That Works
After testing various configurations, here is what stuck:
Tier 1: Deterministic (zero model calls)
If a shell command answers the question — grep, jq, git log, wc -l — do not call a model at all. This handles ~15-20% of agent turns.
Tier 2: Cheap model (Haiku / Luna / similar)
File location, text extraction, mechanical edits from a spec, log parsing, simple refactors. The model needs to follow instructions, not reason deeply. ~40-50% of turns.
Tier 3: Frontier model (Opus / Fable / GPT-5.5)
Architecture decisions, complex debugging, design reviews, novel algorithm implementation. The work where model quality actually changes the outcome. ~30-35% of turns.
The Escalation Problem
The naive approach is letting the cheap model decide when it is stuck. This does not work. In my testing, cheap models were confidently wrong in both directions — claiming they could not handle tasks they could, and claiming success when they had produced subtly broken code.
What works: verified escalation. A tier only steps up when a concrete check fails — the test suite, the compiler, a schema validation, a diff that does not apply cleanly. One retry per step, capped.
What Does Not Change
Routing saves money on the mechanical work. It does not make hard problems easier.
If you are spending $200/month on Claude Code Max and it is mostly going to actual reasoning work, routing might save you 30%. If you are spending $10K/month on API and half of it is burning Opus tokens on grep-equivalent tasks, routing might save you 70%.
The ROI depends on your ratio of thinking to typing.
The Real Lesson
The AI coding cost conversation keeps framing itself as "which model is cheapest" or "which subscription is the best deal." Both miss the point.
The right question is: for each turn in your agent session, what is the cheapest model that produces an identical outcome?
Most of the time, the answer is cheaper than what you are running.
I have been building apps with AI coding agents for the past year. Currently shipping 10+ products across iOS, web, and API. The cost data above is from real production usage across multiple codebases.
0 Comments
Log in to join the conversation.No comments yet. Be the first to share your thoughts.