Anthropic API Billing Bug: Sonnet Model Charged at Opus Rates

Bug Details
A significant billing discrepancy has been identified in the Anthropic API for the claude-sonnet-4-6 model. While the API correctly reports the model as Sonnet in the response, the actual billing calculation uses Opus pricing, resulting in higher charges than expected.
Evidence from Raw Event Data
The bug was discovered through analysis of a high-token request with heavy prompt caching. The specific data points from the raw event are:
- Reported Model: claude-sonnet-4-6
- Input Tokens: 6
- Output Tokens: 4,034
- Cache Creation (Write): 61,920 tokens
- Cache Read: 171,391 tokens
- Billed totalCostUsd: $0.5735755
The user noted that this total cost matches exactly what would be expected for Opus pricing, not Sonnet pricing, creating a significant cost difference for API users.
Impact and Context
This bug affects developers using the Anthropic Claude API with the Sonnet model. Since Opus is Anthropic's most expensive model tier, this discrepancy could result in substantially higher costs than anticipated. The bug appears to be in the billing calculation logic rather than the model selection itself, as the API correctly identifies the model as Sonnet in responses.
For developers monitoring API costs, this means current billing reports may be inaccurate for Sonnet usage. The issue was reported on the ClaudeAI subreddit where users are discussing potential workarounds and monitoring for an official fix from Anthropic.
📖 Read the full source: r/ClaudeAI
👀 See Also

Claude-Code v2.1.30 Released with PDF and OAuth Enhancements
Claude-Code v2.1.30 introduces PDF reading enhancements, pre-configured OAuth for MCP servers, and several fixes and improvements.

AI Subscription Pricing Crash: Why Your Enterprise Bill Is About to 10x
AI labs like OpenAI, Anthropic, and Microsoft are losing money on every subscription seat. Agentic workloads have broken the flat-fee model — GitHub Copilot moves to usage-based billing June 1, 2026. Enterprises that built on subsidized pricing face a correction.

The Build vs. Buy Paradox in the AI Agent Era
Developers earning $100/hr routinely spend 10+ hours building with Claude and n8n to avoid paying $30–50/month for a working product, ignoring the $1k+ opportunity cost.

Research shows personality affects Claude's self-correction, not Llama or Qwen
A researcher ran 23 experiments testing self-correction without guardrails across Claude, Llama, and Qwen. The main finding: personality profiles affect Claude's self-correction ability, with high directness catching all errors and low directness catching none. Llama and Qwen didn't self-correct even with identical prompts.