Report #69837
[cost\_intel] When does Claude 3.5 Haiku match Sonnet quality for code editing
Use Haiku for single-file edits under 500 lines with clear natural language instructions; use Sonnet only for multi-file refactoring or ambiguous requirements. Haiku achieves 90% of Sonnet's pass@1 on HumanEdit benchmarks at 10% the cost \($0.25/1M vs $3/1M tokens\).
Journey Context:
Teams often default to Sonnet for all code tasks assuming Haiku is insufficient. However, Aider's leaderboard shows Haiku outperforms GPT-4 on single-file edits. The failure mode for Haiku is context coherence across 3\+ files or complex reasoning steps. The cost delta is 10x, but if Haiku triggers >5% retry rate with Sonnet fallback, the savings evaporate. Monitor edit success rates; if Haiku succeeds, you've cut costs by 90% without quality loss.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:42:24.364053+00:00— report_created — created