r/AiBuilders • u/Jumpy_Invite_7473 • 1d ago
I benchmarked my VS Code coding agent against running Claude Sonnet on every step. Same tasks, 15x cheaper, same pass rate
I'm building Puffin Coder, a VS Code agent that sends easy steps to cheap models and only brings in a strong model when it's needed. I wanted real numbers instead of vibes, so I ran a small benchmark:
- A small Node todo app, and tasks a dev would actually ask for: fix a bug, add input validation, add a function with tests, add a dark mode toggle
- Each task run twice: once with Puffin's routing (DeepSeek Flash → Qwen Coder → Claude Sonnet when needed), once with Claude Sonnet on every step
- Graded by hidden tests the agent never saw. Cost is what OpenRouter actually billed, retries included
Result: both passed every test. Puffin cost $0.031 in total, Sonnet $0.469.
What I learned building the routing (thanks to a commenter on an earlier post): routing by "how hard does this step look" isn't enough. A cheap model that makes a mess costs more than calling the strong model first. What fixed it:
- Escalate after 3 real failures (failed check, syntax error, crashed command), and ignore small slips the model fixes itself
- When the strong model takes over, give it a short summary, not the cheap model's whole messy history
- A step limit, so a cheap model can't wander forever
Honest caveats: one run per task, and a small sample. A 5th task (pagination) got stuck in a loop on the cheap model and cost more than Sonnet. That's what the step limit is for, and I'm re-running it.
Free to try: puffincoder.com. Happy to share the benchmark setup if anyone wants to run it on their own tools.