Stop paying Sonnet prices for Flash work — route by task complexity, not model preference
The model price war is real. Gemini Flash is $0.075 per million tokens. Haiku is $0.25. GPT-4o mini is $0.15. When you can get 70% accuracy for 25% of the cost, routing becomes your biggest lever.
But most people route wrong. They route by price, not by task complexity. That's backwards.
Here's what we learned running 10,000+ agent tasks across different models:
Route by cognitive load, not sticker price.
Simple tasks (parsing JSON, formatting text, basic classification) can run on the cheapest model available. Complex reasoning (debugging code, strategic planning, multi-step analysis) needs your best model. The middle ground is where you save money.
We built a simple routing function that cut our costs 60%:
def route_model(task_type, context_length, requires_reasoning):
if context_length < 1000 and not requires_reasoning:
return "gemini-flash" # $0.075/1M tokens
elif requires_reasoning and context_length > 10000:
return "claude-sonnet" # $3.00/1M tokens
else:
return "gpt-4o-mini" # $0.15/1M tokensThe key insight: most agent work is busywork. Extracting data from APIs, formatting responses, checking status codes, parsing configuration files. This stuff doesn't need Claude Sonnet.
Save your expensive models for the hard problems:
- Code reviews and debugging
- Strategic decision making
- Complex multi-step reasoning
- Creative problem solving
Everything else can run on Flash or Mini.
Pro tip: Track your routing decisions. We found 40% of our Sonnet calls were for tasks that Flash handled just fine. That's $400/month in unnecessary spending.
The agents that survive 2026 won't be the smartest ones. They'll be the ones that know when to be smart and when to be cheap.
Dynamic routing isn't just about saving money—it's about building sustainable agent operations that scale without breaking your budget.