Cloudflare cuts AI code review cost 68% to $0.77 with OpenCode v2
Cloudflare says its average AI code review now costs $0.77, down 68%, after moving to OpenCode v2 and reworking its model choices and token use.
Cloudflare says its average AI code review now costs $0.77, down 68% from the $2.43 it averaged over its two most expensive weeks before an optimization push. The company detailed the work in a blog post by Ryan Skidmore published October 19, 2026.
The bill had been climbing all year. When Cloudflare first wrote about its AI code reviewer in April, a review cost $1.19. By the end of August it was about $2.46, with no major architectural change: the same coordinator handed work to the same specialist reviewers, and the same risk tiers set how intensive a review was.
Around mid-September, Cloudflare tasked its agents with finding where the tokens were going and cutting them aggressively. The company says about 40% of the savings came from changes to the reviewer’s code, and the rest from experimenting with which models it uses and how much effort they put in.
Model swaps drove the increase
Cloudflare’s chart of weekday review costs, with the mix of review tiers held fixed, shows the average rising from $1.22 in March to $1.44 in June, $1.74 in July and $2.32 in August. Only a small part of that came from more reviews landing in the most expensive tier, which grew from 59% of reviews in March to 65% in August.
Most of the increase, Cloudflare says, came from model changes. At the start of August it moved every reviewer onto Anthropic models, raising the cost per job from $1.38 to $2.03. It made that choice because Anthropic models performed better on this workload in its evaluations.
Its internal standards reviewer, Codex, ended up on Claude Opus 4.7 for a mix of performance and reliability, taking it from about $0.25 per review to $0.88 in August — more expensive than the coordinator agent itself. Cache hit rate rose from 85.7% in April to 97% by September, but tokens per review more than tripled, from 0.91 million to 2.99 million.
Most of the money went to context
Just before the optimization work, Cloudflare’s AI review spend broke down as roughly 23% output tokens, 43% cache writes and 34% cache reads — meaning most of the money went on context the model had already seen or was about to see again. The code quality reviewer made 16.6 LLM calls per review on average.
The reviewer now runs on OpenCode v2, a ground-up rewrite. Before switching, Cloudflare ran every review in every canary repo on both versions in shadow mode; the two agreed on the approval decision in 98% of the merge requests tested. It moved everyone over in early October and removed the v1 code. On two days with the same models, full-tier reviews on v2 finished about 13% faster.
Speed improved overall too: the median review now takes 1m 32s instead of 4m 09s. Cloudflare says it is also experimenting with running its internal AI reviewer solely on Durable Objects using pi-durable, and expects to share more soon.
The post is a company account of its own internal tooling, not a product announcement, so there is nothing to install or buy. Teams building similar reviewers can read the full breakdown on the Cloudflare blog.
Related reading
Sources
- Cutting our inference bill by 68% by being obsessive about optimization — Cloudflare Blog
Some links on this page may be affiliate links. If you buy through them we may earn a commission at no extra cost to you. See our affiliate disclosure.