Eight AI models fixing a failing Python unit test
The task: Fix a failing unit test
- Products tested
- 8
- Top score
- 40 / 40 runs7 of 8 products
- AppFor Pick
- Claude Haiku 5.5 · Best value
Results at a glance
| Product | Passed runs | Total cost | Median reply |
|---|---|---|---|
| 40 / 40 | $0.017 | 2.6 s | |
| 40 / 40 | $0.020 | 3.6 s | |
| 40 / 40 | $0.077 | 4.1 s | |
| 40 / 40 | $0.107 | 5.1 s | |
| 40 / 40 | $0.123 | 3.5 s | |
| 40 / 40 | $0.183 | 4.9 s | |
| 40 / 40 | $0.339 | 6.5 s | |
| 11 / 40 | $0.648 | 72 s |
Result by result
- AppFor Pick · Best value
Fixed all 20 bugs in both rounds (40 of 40 runs) for $0.017 in total, the lowest cost in this edition, with the fastest median reply (2.6 s).
- Passed runs
- 40 / 40
- Total cost
- $0.017
- Per passed run
- $0.0004
- Median reply
- 2.6 s
Limitation In 1 of 40 runs it rewrote more of the module than needed: 7 changed lines where the fix needs one.
Fixed all 20 bugs in both rounds (40 of 40 runs) for $0.020 in total, with a median reply of 3.6 s.
- Passed runs
- 40 / 40
- Total cost
- $0.020
- Per passed run
- $0.0005
- Median reply
- 3.6 s
Limitation Response times were uneven: the median reply took 3.6 s, the slowest 13.3 s. OpenRouter served its replies from 13 different hosting providers.
Fixed all 20 bugs in both rounds (40 of 40 runs) for $0.077 in total, with a median reply of 4.1 s.
- Passed runs
- 40 / 40
- Total cost
- $0.077
- Per passed run
- $0.0019
- Median reply
- 4.1 s
Limitation It cost 4.6 times as much per passed run as Claude Haiku 5.5 ($0.0019 against $0.0004) for the same score.
Fixed all 20 bugs in both rounds (40 of 40 runs) for $0.107 in total, with a median reply of 5.1 s.
- Passed runs
- 40 / 40
- Total cost
- $0.107
- Per passed run
- $0.0027
- Median reply
- 5.1 s
Limitation In 4 of 40 runs it changed more lines than needed, up to 11 lines for a one-line fix.
Fixed all 20 bugs in both rounds (40 of 40 runs) for $0.123 in total and never changed more than three lines, with a median reply of 3.5 s.
- Passed runs
- 40 / 40
- Total cost
- $0.123
- Per passed run
- $0.0031
- Median reply
- 3.5 s
Limitation Response times were uneven: the median reply took 3.5 s, the slowest 44 s.
Fixed all 20 bugs in both rounds (40 of 40 runs) for $0.183 in total, with a median reply of 4.9 s.
- Passed runs
- 40 / 40
- Total cost
- $0.183
- Per passed run
- $0.0046
- Median reply
- 4.9 s
Limitation It cost 11 times as much per passed run as Claude Haiku 5.5 ($0.0046 against $0.0004) for the same score.
Fixed all 20 bugs in both rounds (40 of 40 runs) for $0.339 in total, with a median reply of 6.5 s.
- Passed runs
- 40 / 40
- Total cost
- $0.339
- Per passed run
- $0.0085
- Median reply
- 6.5 s
Limitation The most expensive and the slowest of the models that passed every run: $0.0085 per passed run, 20 times Claude Haiku 5.5, and a median reply of 6.5 s.
Returned a working fix in 11 of 40 runs. In the other 29 it spent the whole 8,000-token output allowance on reasoning and gave no answer.
- Passed runs
- 11 / 40
- Total cost
- $0.648
- Per passed run
- $0.059
- Median reply
- 72 s
Limitation With default reasoning settings it needed a median 72 s and the full 8,000 output tokens per task, against under 7 s and under 1,000 tokens for the other models.
How we tested
We gave eight AI models the same 20 short Python modules. Each module had one bug and a unit test that failed because of it. Every model received the module, a description of what it should do and the failing test in an identical prompt through the OpenRouter API, and had to return the corrected module.
A reply passed only if its code made both the visible test and a hidden suite of 9 to 12 further tests pass, run in an isolated Python 3.12 container without network access. Each model answered every task twice, so the score is the share of 40 runs that passed.
Places are awarded only when the scores separate the models; this month seven models passed all 40 runs, so this edition has no places. The best-value Pick goes to the lowest cost per passed run among the models within five points of the top score. Results are listed by score, then by total cost.
We used temperature 0 where the model accepts it, otherwise the provider default, the default reasoning settings and at most 8,000 output tokens including reasoning. The tasks were written for this test and published only after it. This edition tests the models through their API, not the chat apps built on them, and covers mid-priced and budget models; the most expensive flagship models were not included.
Each result links to every reply, the extracted code, the test outcome, tokens, cost and response time.