Dev Tools · 2h ago
Two-Tier AI Code Review Slashes CI Costs Using Local Models and Caching
A developer built a two-tier AI code review system that uses a small local model to triage diffs, escalating only risky changes to a large frontier model with prompt caching. The triage pass handles most PRs (docs, tests, formatting) cheaply, while the big model reviews only high-risk files like auth or money logic. This approach dramatically reduces costs without sacrificing critical review quality.
Meridian48 take
The technique is pragmatic but depends on the small model's triage accuracy—false negatives could miss subtle security bugs that a full review would catch.
Read the full reporting
The Cheap Way to Add AI Review to CI: Small Local Models Plus Prompt Caching →
DEV Community
ai-code-reviewci-cost-optimization