Compare cost per accepted patch, include failed runs and calculate a break-even point before choosing a Claude model for your repository.
Sonnet produces a cheap patch, fails the test and tries twice more. Opus finishes in one turn. Which bill is lower? A retry may include an entire build log, and the first Opus call may generate considerably more code. Count the whole run.
Calculate cost per accepted patch
Add the charges for every task in the sample, including abandoned runs, and divide by the number of accepted patches. In a hypothetical trial, ten Sonnet runs at $0.12 with six accepted fixes cost $1.20 / 6 = $0.20 per fix. Ten Opus runs at $0.18 would need nine accepted fixes to match that figure. These numbers illustrate the break-even calculation.
Build a small repository trial
Include a one-condition fix, a change spanning two files and a bug with an incomplete report. Pin the starting revision, tools and retry allowance. Define acceptance before the run: for example, a new regression test and the existing suite must pass without rewriting expected results.
Decide by task type
Compare outcomes within each category. Simple fixes may pass reliably on the cheaper model. For tasks still needing a developer after two attempts, record review time and escalation cost. A single average across the three categories can hide the workflow that costs the most.
Opus 5.5 · Sonnet 5.5 · Pelican
- Codex Auto Review pricing: what does one pull request cost?
Estimate small, medium and large reviews at current CheapAI rates. Include the follow-up pass and compare the bill with findings your team can reproduce.
- Claude Fable API pricing for a 100k-token document
Price an initial Fable response and five follow-up questions. Separate uncached input, cache reads and output and check the exact model version.
- Codex 401 with a custom API key: check the host before buying credits
Diagnose invalid_api_key with the request URL, a catalog check and three provider settings. Keep the key out of terminal output and support tickets.
- Do Russian prompts cost more than English? Measure your own API tokens
Run a paired Claude token-count test, keep the code and tools fixed, then convert the difference to dollars before changing your team’s working language.
- An AI stream ended after HTTP 200. Did the response finish?
Inspect the final stream event, distinguish an output limit from a disconnect, and decide whether retrying a tool call could duplicate work.
- What can a pelican SVG tell you about a coding model?
Evaluate rendering, instruction following and animation separately. Then compare the result with a reproducible patch in your own repository.
- How much does a Codex coding task cost through the API?
Estimate the cost of one bug fix and a batch of twenty using live API rates. Compare models by the cost of a passing patch, including retries.
- Claude wrote the prompt cache. Why did the next request read zero?
Read Claude usage fields, price a cache miss and run a controlled two-request check before changing your prompts or your API provider.
- How to check Gemini input token counts on long requests
Compare countTokens with usageMetadata on the same Gemini payload. Isolate chat history, tools, cached input and multilingual text before disputing a bill.