GPT-5 vs Claude Sonnet 4: real per-task cost and benchmark comparison for production workloads
Dev.to AI
•
Generative AI
AI Research
You're choosing between GPT-5 and Claude Sonnet 4 for a production workload. Pricing pages give you per-million-token numbers. Benchmark leaderboards give you scores that don't always survive contact with your actual queries. The honest comparison lives in between - per-task cost on workloads that look like yours, with the gotchas that don't show up on either page. This post is that comparison. Deprecation note before we go further. Claude Sonnet 4 ( claude-sonnet-4-20250514, launched May 22, 2025) is deprecated and retires on June 15, 2026.