ACP UsageUpdate.cost reports Sonnet pricing for Opus 4.6 model

Resolved 💬 3 comments Opened Mar 27, 2026 by simonrosenberg Closed May 5, 2026

Bug Description

When running claude-opus-4-6 via the ACP protocol (claude-agent-acp), the UsageUpdate.cost.amount values use Sonnet pricing ($3/$15/$0.30/$3.75 per MTok) instead of the correct Opus 4.6 pricing ($5/$25/$0.50/$6.25 per MTok).

This is the reverse direction of the pricing table swap reported in #28168 (which documents Sonnet 4.6 getting Opus pricing). That issue focuses on the Prometheus cost_usage_total metric; this issue is specifically about cost reported via the ACP protocol's UsageUpdate.cost field.

Reproduction

  1. Start a claude-agent-acp session with model claude-opus-4-6
  2. Run any task that generates token usage
  3. Observe the cumulative cost.amount in UsageUpdate notifications
  4. Compare against token counts × correct Opus 4.6 rates

Evidence

From evaluation benchmark runs (500 swebench instances using claude-opus-4-6 via ACP):

Example instance (django__django-13513):

prompt_tokens=22, completion_tokens=5572, cache_read_tokens=521904, cache_write_tokens=11940
Reported cost (from UsageUpdate): $0.2850

At Sonnet ($3/$15/$0.30/$3.75 per MTok):    $0.2850  ← exact match
At Opus 4.6 ($5/$25/$0.50/$6.25 per MTok):  $0.4750  ← expected

Across 500 instances:

  • 405/500 (81%) match Sonnet pricing to floating-point precision
  • 0/500 match correct Opus 4.6 pricing
  • 95/500 are slightly above Sonnet calculation (ACP-internal overhead from retries/tool routing)

Setup

  • claude-agent-acp (from @zed-industries/claude-agent-acp, wrapping Claude Code)
  • Model passed via ACP session _meta: {"claudeCode": {"options": {"model": "claude-opus-4-6"}}}
  • API calls routed through a LiteLLM proxy (set via ANTHROPIC_BASE_URL)

Root Cause

Per the analysis in #28168, Claude Code's internal pricing table (xJ$) has the Sonnet 4.6 and Opus 4.6 pricing entries swapped. The UsageUpdate.cost computation likely uses the same pricing lookup, so Opus 4.6 resolves to Sonnet rates ($3/$15) and vice versa.

Impact

All ACP-based evaluations using claude-opus-4-6 have incorrect cost telemetry. In our case, 1,114 benchmark instances across 5 benchmarks report $943 total cost when the correct value is ~$1,572 — a 40% underreport.

Additional: thought_tokens not populated

Separately, PromptResponse.usage.thought_tokens is always null/0 for Opus 4.6 sessions, even though the ACP Usage schema supports it and Opus 4.6 uses extended thinking. This means reasoning token usage is invisible to ACP clients.

Expected Behavior

  1. UsageUpdate.cost.amount should use Opus 4.6 pricing ($5/$25/$0.50/$6.25 per MTok)
  2. PromptResponse.usage.thought_tokens should be populated when extended thinking is active

Related

  • #28168 — Same pricing table bug, reported from the Sonnet/Prometheus side

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗