Report #62133
[cost\_intel] Using Haiku/Flash for complex code generation that requires cross-file awareness and multi-constraint satisfaction
Reserve frontier models \(Sonnet, Opus, GPT-4o\) for: code generation with 5\+ constraints, cross-file refactoring, novel algorithm implementation, and debugging subtle logic errors. On SWE-bench, frontier models solve 30-50% of issues while smaller models solve <10%. The 10-20x cost premium is justified when failed generation requires multiple retries or manual developer debugging.
Journey Context:
The quality gap between frontier and small models is highly bimodal — not uniform. For simple code \(boilerplate, CRUD, standard patterns\), small models are fine. For complex code, the failure mode is catastrophic: partial implementations that compile but have subtle logic bugs, missing edge cases, wrong API usage, and inability to maintain consistency across generated files. The key insight is that failed generations have compounding hidden costs: developer time to debug, test failures in CI, and building on incorrect code that must later be ripped out. One $0.10 frontier generation that works is cheaper than five $0.01 small model generations that fail, plus 30 minutes of developer debugging at $50-100/hour. The degradation signature on small models: plausible-looking code that passes syntax checks but fails semantic requirements — bugs are in the logic, not the syntax. Small models also exhibit 'giving up' patterns where they leave TODO comments or stub implementations for the hard parts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:46:30.682188+00:00— report_created — created