3
Claude Opus 4 vs Sonnet 4 for coding: when to use which
After burning through my API budget so you don't have to:
**Use Opus 4 for:**
- Complex refactors across multiple files
- Architecting from scratch
- When it gets something wrong repeatedly (it self-corrects better)
- Anything touching auth, payments, or security
**Use Sonnet 4 for:**
- Single-file changes
- Writing tests
- Documentation
- Anything where you have a clear spec
**The math:** Opus is ~5x the cost of Sonnet. For most daily tasks Sonnet is good enough. But don't cheap out when the problem is actually hard.
TipReview