Cloudflare cuts AI code review costs 68%
Cloudflare reduced the average cost of its internal AI code review from $2.43 to $0.77, showing how model choice and prompt-cache design can drive agentic workloads' token bills more than architecture.
Cloudflare reported that its internal AI code reviewer now costs $0.77 per review on average. That is 68% below the $2.43 it averaged over its two most expensive weeks. Median review time also fell, from 4m 09s to 1m 32s.
Costs had roughly doubled since April, rising from $1.19 to about $2.46 by late August, even though the architecture had not changed. The company said most of the increase came from model changes. In early August it moved every reviewer onto Anthropic models, which it said performed best in its evals. That raised the cost per job from $1.38 to $2.03. The internal standards reviewer moved to Claude Opus 4.7, and its cost went from about $0.25 to $0.88 per review. Tokens per review more than tripled over the period, from 0.91 million to 2.99 million. A larger share of reviews also landed in the most expensive "full review" tier, which Cloudflare linked to engineers submitting bigger changes.
Before the optimization work, 43% of spend went to cache writes and 34% to cache reads. The first call of a session hit a cached prefix only 14% to 26% of the time, even though 11k to 21k tokens of tool definitions and prompts were identical across repositories. Cloudflare traced this to OpenCode v1, which placed the only cache breakpoint after repository-specific environment details, so the shared prefix was never cached on its own.
About 40% of the savings came from changes to the reviewer's code, and the rest from changing models and effort levels. The reviewer now runs on OpenCode v2. In shadow testing, v2 agreed with v1 on 98% of approval decisions.