Cloudflare cuts AI code review inference cost 68% through prompt-cache sharing and model/effort tuning
Cloudflare reports that the average cost of its internal AI code reviewer rose from $1.19 (April) to about $2.46 (end of August 2026), then fell to $0.77 per review after a cost-optimization effort starting in mid-September. Median review time dropped from 4m 09s to 1m 32s. Roughly 40% of the savings came from code changes and the rest from model and effort choices. This is engineering and product news with no vulnerability, incident or threat activity.
Detalhes técnicos
- The cost increase was driven mainly by the early-August move of all reviewers to Anthropic models, including the standards reviewer (Codex) on Claude Opus 4.7, and by tokens per review growing from 0.91M to 2.99M.
- Spend was split roughly 43% cache writes, 34% cache reads and 23% output tokens. The first request of each session found a cached prefix only 14-26% of the time, because OpenCode v1 built one system prompt block with a single cache breakpoint.
- Fixes included splitting the system prompt at a marker to share a cached prefix across repositories, removing tools reviewers could not use, and reading files in parallel. They also included skipping reviewers on re-reviews, stopping after the review is posted, handling timeouts separately from provider failures, and stopping cancelled GitLab jobs.
- The code quality, security and performance reviewers now share one prefix, with one writing the cache and the others waiting up to 20 seconds to read it.
- Model changes: the coordinator moved to Opus 5.5 at medium effort, and Sonnet reviewers moved from Sonnet 5 to Sonnet 5.5. Code quality is moving to high effort, which found 58% more critical and warning findings at about two cents more per review.
- Quality checks: author action on serious code quality findings rose from 34% to 59%. Judge-model review showed inflated-severity findings fell 70%. Performance lost real findings at medium effort, and security possibly did too.
- The reviewer also moved to OpenCode v2 in early October after a shadow comparison with 98% approval agreement.
Remediação
No remediation applies. The article recommends checking that each agent session's first request actually reads from the prompt cache, and that reviewers still find real problems at the paid effort level.
Linha do tempo
-
Cloudflare cuts AI code review inference cost 68% through prompt-cache sharing and model/effort tuning
ler a análise desta fonte ocultar
Cloudflare reports that the average cost of its internal AI code reviewer rose from $1.19 (April) to about $2.46 (end of August 2026), then fell to $0.77 per review after a cost-optimization effort starting in mid-September. Median review time dropped from 4m 09s to 1m 32s. Roughly 40% of the savings came from code changes and the rest from model and effort choices. This is engineering and product news with no vulnerability, incident or threat activity.
Technical Details
- The cost increase was driven mainly by the early-August move of all reviewers to Anthropic models, including the standards reviewer (Codex) on Claude Opus 4.7, and by tokens per review growing from 0.91M to 2.99M.
- Spend was split roughly 43% cache writes, 34% cache reads and 23% output tokens. The first request of each session found a cached prefix only 14-26% of the time, because OpenCode v1 built one system prompt block with a single cache breakpoint.
- Fixes included splitting the system prompt at a marker to share a cached prefix across repositories, removing tools reviewers could not use, and reading files in parallel. They also included skipping reviewers on re-reviews, stopping after the review is posted, handling timeouts separately from provider failures, and stopping cancelled GitLab jobs.
- The code quality, security and performance reviewers now share one prefix, with one writing the cache and the others waiting up to 20 seconds to read it.
- Model changes: the coordinator moved to Opus 5.5 at medium effort, and Sonnet reviewers moved from Sonnet 5 to Sonnet 5.5. Code quality is moving to high effort, which found 58% more critical and warning findings at about two cents more per review.
- Quality checks: author action on serious code quality findings rose from 34% to 59%. Judge-model review showed inflated-severity findings fell 70%. Performance lost real findings at medium effort, and security possibly did too.
- The reviewer also moved to OpenCode v2 in early October after a shadow comparison with 98% approval agreement.
Remediation
No remediation applies. The article recommends checking that each agent session's first request actually reads from the prompt cache, and that reviewers still find real problems at the paid effort level.