Cloudflare says it cut the average cost of an AI code review from $2.43 to $0.77, while reducing the median review time from 4 minutes 9 seconds to 1 minute 32 seconds. Its account offers a useful look at where the bill went: repeated prompt context, unnecessary model calls and wasted work all added up.
Cloudflare Watch analysis
What happened
The changes targeted Cloudflare’s internal code reviewer, which uses specialist reviewers for areas including code quality, security and performance. The company says about 40% of the savings came from code and workflow changes, with the rest coming from choices about models and how much effort they used.
One fix let reviews across different repositories reuse the same cached prompt prefix. Cloudflare also reduced calls by removing unusable tools, reading files in parallel, skipping reviewers when a repeat review had nothing new to inspect, and stopping after the review was posted. It says these changes brought the cost per review from $2.47 to $2.02 before later model and effort changes.
Why it matters
The largest cost was not simply the answer being generated. Cloudflare says cache reads and writes accounted for most of its reviewer’s spend, because each model call repeatedly sent a large conversation as context. Sharing a reusable prefix and trimming unnecessary calls attacked that underlying workload.
The figures are from Cloudflare’s own system and comparisons, not a controlled industry-wide benchmark. The company says some savings were measured across periods before and after changes, and cautions that those comparisons are not statistically sound controlled experiments. Still, the practical lesson is tangible: managing context and workflow can matter as much as choosing a cheaper model.
Our read
This is a better AI-cost story than the usual race to announce a new model: Cloudflare shows how much there may be to reclaim in the plumbing around one. Teams building AI reviewers should look first at repeated context, redundant calls and work that continues after the useful result is already in hand. The 68% is a company-specific result, but the sources of waste are recognisable engineering problems, not magic tricks.
What to watch
- Whether Cloudflare publishes further results on review quality after changing models and effort levels.
- Whether the same caching and workflow changes help other AI workloads.
- How much the savings vary with repository size, review type and model choice.
Discussion spark: For AI tools used in real engineering work, should teams prioritise making each model call cheaper, or redesigning the workflow so fewer calls are needed?
Sources and evidence
- Cutting our inference bill by 68% by being obsessive about optimization (19 October 2026, 19:12 UTC)
not affiliated with or endorsed by Cloudflare