Report #70583
[cost\_intel] Using the same model for code generation and code review despite asymmetric quality curves
Use Haiku/Flash/GPT-4o-mini for initial code generation from clear specs \(roughly 80-85% functional accuracy\), but use Sonnet/GPT-4o for code review, debugging, and refactoring. Small models miss critical issues 3-5x more often on review tasks. Cost-optimal pattern: generate with small model, test automatically, review failures with frontier model.
Journey Context:
Code generation and code review have fundamentally different quality curves on small vs frontier models. For generation from clear specifications \(write a function that does X given Y constraints\), small models produce functional code roughly 80-85% of the time—often acceptable with automated testing. But for review tasks \(find the bug, identify security vulnerabilities, suggest refactoring\), small models miss critical issues 40-60% of the time. The reason: generation follows patterns the model has seen in training data, while review requires adversarial reasoning—actively searching for failure modes, considering edge cases, and understanding system-level implications. The degradation signature for small model code review: \(1\) Flags stylistic issues while missing logical errors, \(2\) Suggests changes that introduce new bugs, \(3\) Cannot reason about concurrency, state management, or security implications, \(4\) Approves code with subtle off-by-one or null handling errors. The cost-optimal pattern: generate with small model, run automated tests, and only send failures and edge cases to the frontier model for review. This gives you roughly 80% of code at small-model pricing and only pays frontier prices for the roughly 20% that needs deeper analysis. This pattern typically reduces overall code pipeline costs by 40-60% vs using frontier models for everything.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:03:13.958275+00:00— report_created — created