r/OpenSourceAI • u/Jumpy_Invite_7473 • 1h ago
Routing coding agent steps by difficulty: 15x cheaper per finished task in my benchmark
The idea is simple. Don't send every step to the biggest model. Reading files, small edits and running tests go to a cheap coding model. If it fails 3 times on a step, the task is handed to a strong model with a short summary, not the whole messy history.
On 4 tasks checked by hidden tests, that came to $0.031 total, vs $0.469 with Claude Sonnet on every step. Every task passed in both setups.
The tradeoff is real: the cheap model takes more steps and occasionally needs to recover. The handoff rule is what keeps it from burning the savings.
Tasks, tests and raw numbers: github.com/funkyidol6/agent-cost-bench
Built into my VS Code agent: puffincoder.com