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

David Silver's Ineffable Intelligence Raises $1.1B for RL-Based Superlearner Without Human Data
Ineffable Intelligence, founded by DeepMind alum David Silver, raised $1.1B at a $5.1B valuation to build a reinforcement learning-based 'superlearner' that discovers knowledge without human data.

Claude Code users hitting usage limits faster than expected, bugs suspected
Anthropic acknowledges Claude Code users are exhausting quotas 'way faster than expected,' with users reporting maxed-out limits within hours. Suspected bugs in prompt caching may be inflating costs by 10-20x, and downgrading to version 2.1.34 reportedly helps.

Claude Code Cache Bugs Can Increase API Costs 10-20x
Two cache bugs in Claude Code can silently increase API costs by 10-20 times. The issues were reported on Reddit and discussed on Hacker News.

OpenClaw's Frequent Breaking Changes: Update Procedures and Current Issues
OpenClaw has released 13 point versions in March 2026 alone, with breaking changes occurring every 2-3 weeks. The source provides specific update procedures and details current issues in version 3.28, including localhost authentication changes and regression bugs.