The Cheap Way to Add AI Review to CI: Small Local Models Plus Prompt Caching A developer built a two-tier AI code review system for CI that uses a small local model for triage and a large model with prompt caching for high-risk diffs, cutting costs without sacrificing review quality. The triage model classifies diffs as low or high risk, short-circuiting most PRs, while the large model's prompt caching reduces per-review costs by reusing stable system prompts and repo context. I wired an AI code reviewer into CI, felt clever, and then looked at the bill after a busy week of PRs. Every push, every commit, sending full diffs to a big frontier model. It added up faster than I expected, and most of what it was reviewing was formatting changes and README edits that did not need a genius reading them. So I rebuilt it as two tiers, and the cost dropped hard without losing the catches that mattered. The idea is simple. Do not send everything to the expensive model. Use a cheap model as a bouncer that decides what is even worth escalating, and reserve the big model with caching turned on for the files that could actually hurt you. The first tier looks at the diff and answers one question: is anything here risky enough to justify a real review? That is a classification task, and classification does not need a frontier model. I run this tier on a small local model. On my own machine that is Ollama with qwen2.5-coder, but in CI it can be a self-hosted small model or the cheapest cloud tier your provider offers. The job is triage, not judgment. The triage prompt is deliberately narrow. I do not ask it to review. I ask it to route: You are a triage filter for code review. For the diff below, output JSON only: { "risk": "low" | "high", "reason": "