Cloudflare cuts its AI code reviewer cost by 68%
Cache restructuring and model routing took the average review from $2.43 to $0.77, with reviews finishing nearly three times faster.
Cloudflare has cut the average cost of running its internal AI code reviewer by 68%, from $2.43 to $0.77 a review, by reworking prompt caching and changing which models it calls. The team wrote up the work in a blog post on 19 October, a follow-up to an April post where an average review cost $1.19, a figure that had crept to $2.46 by the end of August as the reviewer moved onto better, more token-hungry models.
Cache writes had grown to 43% of the bill. Restructuring the system prompt so a cache could be shared across repositories raised the first-request cache hit rate from roughly 14-26% up to 91-99.5%. The team also moved models, from Opus 5 to Opus 5.5 and then to Sonnet 5.5, tuned effort levels per review type, and trimmed idle work by removing unused tools, parallelising file reads, and skipping redundant reviewers on re-reviews. Review time dropped alongside cost: the median review now takes 1 minute 32 seconds, down from 4 minutes 9 seconds.
Why it matters: anyone running an LLM-based tool against a high-volume workload like pull requests has the same levers available. Cloudflare says roughly 40% of its savings came from changes to the reviewer’s own code, the rest from model choice and effort-level tuning, not from waiting for a cheaper model to arrive.
The caveat: these are Cloudflare’s own figures from its own reviewer and prompt structure. The exact percentages will not carry over to a different codebase or provider.