Are We Overpaying for AI Agents? Most Tasks Don't Need a Frontier Model.
Hey everyone! When your coding agent opens a file, greps for a function name, or reads a wall of test output, which model is doing that work? For most of us, it's the same expensive model that writes the hard code, on every step of every loop. I think that's where most agent money goes. I'm buildin

Hey everyone! When your coding agent opens a file, greps for a function name, or reads a wall of test output, which model is doing that work?
For most of us, it's the same expensive model that writes the hard code, on every step of every loop.
I think that's where most agent money goes. I'm building my own agent harness around fixing it, and here's the case for routing each step to the cheapest model that can handle it.
Watch a coding agent work and you'll see a lot of looking around before any code gets written. Researchers at the University of Washington released a trace of about 4,300 real Claude Code and Codex sessions. That's roughly 350,000 model calls and 430,000 tool calls. Their main finding was long loops with long contexts and short outputs.
The bill follows the same pattern. One study cited in Augment's cost breakdown found agentic coding uses over 1,000 times more tokens than a single-turn question, with more than 150 input tokens for every output token. A dev who tracked a week of their own agent averaged 23 Read, Grep and Glob calls per prompt.
So most of the work is reading files, searching, and summarizing what came back. Picking which file to open next is not a frontier-model problem.
Here's OpenAI's current lineup at the standard tier, per million tokens ( pricing page, December 2026):
The flagship costs 80 times more than the smallest model on both input and output. Most providers sell a similar range of big and small models.
If your agent pushes 10 million input tokens through a day of reading files, that's $80 on the flagship and $1 on the small one. Most of those tokens are grep results and file contents.
Two papers made the case for routing years ago.
FrugalGPT (Stanford, 2023). This paper tries the cheapest model first and only moves up to a pricier one when the answer doesn't pass a quality check. The authors reported matching the best single model with up to 98% lower cost.
RouteLLM (LMSYS and UC Berkeley, 2024). Instead of trying models in order, RouteLLM trains a small router to guess up front which model each request needs. Their best router hit 95% of GPT-4's quality while sending only 26% of calls to GPT-4. With extra training data, that dropped to 14% of calls. The open-source release reports cutting costs by up to 85% on MT Bench.
Both papers tested chat-style questions, not agents. Agent steps should be even easier to route, since so many of them are plain reading and searching.
The simplest way to route an agent is by role, so you don't need a fancy trained router on day one. My harness has five agent roles. Here's the split I'd start with:
Then add one rule from FrugalGPT: if a cheap model fails a step, retry it one size up. That way the big model only sees the work that needs it.
I'm building mine on the OpenAI-compatible API standard, so swapping models is a one-line config change. If your harness locks you into one provider, that's the first thing I'd fix.
Routing isn't free money. A few things to watch:
I think most of us are. We picked one great model, pointed the whole agent at it, and stopped looking at the bill. The cheap models got good enough to read files and summarize test output a while ago.
I want to hear the other side though! Are you routing your agents across models, or sending everything to the flagship on purpose? And if you tried routing and went back, what broke? Let me know in the comments.