What Does an Accepted AI Code Change Cost?
Compare Auto Efficient with a fixed model by counting every attempt it takes to produce a change you would accept. Include the corrections in the cost Suppose an inexpensive model produces a patch that needs two corrections, while another model finishes the same task on its first attempt. The token prices alone cannot tell you which cost less. You need the charges for every attempt, along with…
To determine the cost of an accepted AI code change, you must account for every attempt made to produce a change that meets your acceptance criteria. This includes corrections needed for an inexpensive model and the review time for each patch. Kilo's Auto Efficient system selects models based on request difficulty and session context, using benchmarks to guide routing.
Compare this to a fixed model by calculating the cost per accepted change for both setups. An accepted change is only counted when it passes the criteria you set before the test; failed attempts' costs are still included in the calculation. Define an accepted change before running any tests, keeping the cost of failed attempts in mind.
Use a small batch of resolved issues from a repository, restoring each issue's code to its pre-fix state and removing any solution-revealing material. Set acceptance criteria, such as requiring a name field to reject blank input while preserving valid names and the existing public API. Include regression tests and review the diff for changes outside the task.
Define actions that disqualify a patch, like disabling a test or adding an unapproved dependency. Apply these rules regardless of the model's price. Use the same task budget for both setups, starting with eight maintenance issues and running Auto Efficient and a fixed model in fresh sessions with identical starting files. Keep failures in the calculation by dividing the batch's total inference charges by its accepted changes, including abandoned patches and unsuccessful corrections.
For a hypothetical batch of twenty attempts per setup, suppose Setup A spends $1.20 and produces four accepted changes, while Setup B spends $2.40 and produces twelve. Setup A costs $0.30 per acceptance, while Setup B costs $0.20. Setup B produces three times as many usable changes but spends twice as much overall. Use billed session amounts, report paid infrastructure separately, and exclude unrelated work from the comparison.
Track your time spent on each task, including reading output, answering questions, supplying corrections, and reviewing patches. Group the results by task type and set a retry policy based on your results. Before adopting a new setup, compare the total spend and check its total spend against the current configuration.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to