Report #54799
[cost\_intel] At what code complexity threshold does Claude 3.5 Sonnet become necessary over Haiku for automated code review?
Use Sonnet for code review when the diff contains >3 files with cross-file dependencies, architectural changes, or security-sensitive logic; Haiku works for single-file linting and style fixes. Expect 15x cost increase \($0.80 vs $12 per 1M input tokens\) but 40% reduction in false negatives on security bugs.
Journey Context:
Haiku reviews line-by-line well but misses 'this function in file A breaks invariant assumed in file B.' Sonnet's CoT reasoning traces dependencies. Failure signature of Haiku: approves changes that compile but break integration tests. Security-specific: Haiku misses SQL injection patterns across string concatenation boundaries. Cost analysis: at 10K tokens per review, Haiku costs $0.008, Sonnet costs $0.12. If a missed security bug costs $1000 to fix in production, Sonnet pays for itself after preventing 1 bug per 8000 reviews.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:28:26.222153+00:00— report_created — created