ALEXKRI.NET
Resume Contact
← Back

Cutting our inference bill by 68% by being obsessive about optimization

Everyone argues about which model to use; this is a post about the boring 40%. Cloudflare’s internal AI code reviewer had crept from $1.19 to $2.46 per run, so they moved the agent prompt and tool defs into a shared cacheable prefix — first-request cache hits went from 14-26% to 91-99.5% — then routed sub-reviewers by model and effort. Now $0.77 a review, median 1m32s instead of 4m09s, and serious findings went up, not down.

Read the source ↗