r/ChatGPTCoding • • 2h ago

Resources And Tips I measured cost per finished coding task instead of per token. Cheap models still won, but not the way I expected

I ran 4 real tasks on a small Node app (a bug fix, input validation, duration parsing, a dark mode toggle). Each one is checked by hidden tests, so "done" means the tests pass, not "the model said it's done."

Two setups:

  • Claude Sonnet on every step
  • A cheap coding model on every step, handing off to a strong model only after 3 failed attempts

Results:

  • Bug fix: $0.104 vs $0.003
  • Input validation: $0.094 vs $0.013
  • Duration parsing: $0.114 vs $0.009
  • Dark mode: $0.158 vs $0.006
  • Total: $0.469 vs $0.031. Every task passed in both setups.

What surprised me:

  • The cheap model took more steps: up to 13, where Sonnet took 5–8. It also needed a few recoveries.
  • It still won on price because each step costs a tiny fraction of a Sonnet call.
  • The handoff rule matters most. Without a cap, cheap models can spin forever and eat the savings.

Most agent steps are reading files and small edits. Paying frontier prices for those is where the usage limits go.

Happy to share the tasks and raw numbers if anyone wants to check them.

2 Upvotes

3 comments sorted by

1

u/Best_Researcher491 52m ago

I added the four rows in your post. The cheap path is $0.031 against $0.469, which is 6.6% of the Sonnet total.

The gap is not even across tasks. Input validation is $0.094 vs $0.013 (7.2x). Duration parsing is $0.114 vs $0.009 (12.7x). Dark mode is $0.158 vs $0.006 (26.3x). The bug fix is $0.104 vs $0.003 (34.7x). Extra steps ate most of the savings on validation, and almost none on the bug fix.

1

u/Jumpy_Invite_7473 0m ago

Good breakdown, and you're right about the cause. I split it per step:

  • Cost per step is fairly stable: the cheap model runs about 18–32x cheaper than Sonnet on every task.
  • Step count is what swings the total. On validation the cheap model took 13 steps vs Sonnet's 5, which pulled a ~18x per-step advantage down to 7.2x overall. On the bug fix it actually took one fewer step (5 vs 6), so the advantage grew to 34.7x.

One correction to my own post: recoveries were about even (4 for the cheap model, 5 for Sonnet). The real cost is extra steps, not extra failures.

So the lever isn't model price, it's keeping the cheap model from wandering. That's why I cap attempts and hand off to the strong model after 3 failures. Validation is the case where that cap matters most.

1

u/Kooky-Treat-4416 19m ago

yeah measuring done-when-tests-pass is more honest than token price. cheap models still win for me, but only if i cap the retries and hand off after a few fails, otherwise they just burn the savings on longer loops.