Claude Code 2.1.218 Fixes a Silent Bedrock Billing Bug: Every Operator Running ARN-Mapped Models Must Audit Their Cost Logs

Claude Code misattributed all Bedrock application-inference-profile ARN traffic to the same model ID since February 2026, collapsing Haiku and Opus costs to ~$0.23 per call. Version 2.1.218 fixes ARN resolution — but your historical gateway spend logs are wrong.

Published via Claude Code CHANGELOG

Archive item produced with AI assistance from the cited source and published without individual review. Editor of record: Joe Werner.

Abstract diagram of AWS Bedrock ARN paths resolving to distinct model tiers, with a cost ledger showing corrected per-model billing

Until last week, if you routed Claude Code through AWS Bedrock using application-inference-profile ARNs, every model looked the same to the gateway's spend meter — Haiku 4.5, Sonnet 4.6, and Opus 4.6 each logged ~$0.23 for a "say hello" prompt. The billing signal was flat. The actual cost to your AWS account was not.

Claude Code 2.1.218, released this week, fixes that. The change is logged as a single line in the CHANGELOG: "Fixed gateway spend metering to price Bedrock application-inference-profile ARNs and other config-mapped upstream model IDs at the configured model's rates." The GitHub issue that tracked it (anthropics/claude-code#27890) had been open since February 23, 2026 — nearly five months.

What broke and how

Bedrock offers two ways to reference a model: by its direct model ID (anthropic.claude-haiku-4-5-20261231-v1:0) or by an application-inference-profile ARN (arn:aws:bedrock:<region>:<account>:application-inference-profile/<id>). The ARN path is the enterprise-standard route: it enables cross-region inference, per-team spend tagging, AWS Cost Explorer attribution, and Bedrock Guardrails enforcement. Most teams managing Bedrock at scale use ARNs, not direct model IDs.

Claude Code's gateway spend meter resolved direct model IDs correctly. Application-inference-profile ARNs, however, were treated as opaque strings — the underlying model was never resolved. The meter logged whatever ARN string arrived as the modelUsage key and applied a fixed per-call cost, regardless of whether the ARN pointed to Haiku or Opus.

The practical effect was a billing floor: all Bedrock ARN traffic registered at roughly the same cost, which happened to approximate Opus-class pricing. Teams running Haiku 4.5 via ARN were not seeing the order-of-magnitude cost difference they expected. Teams charting cost-per-model trends saw a flat line for all Bedrock traffic.

Three other features broke alongside billing: adaptive thinking (which only activates for specific Sonnet/Opus families), model-specific beta headers (some must be omitted for Haiku), and the /model picker (which could not map ARN back to a selectable model name). All four failures share a root cause — the ARN-to-model-ID resolution step was missing.

The operator accounting gap

Claude Code runs its own spend ledger on top of Bedrock's native billing. This dual-layer accounting design means the two systems can diverge: your AWS Cost Explorer may show correct Bedrock charges (because AWS tracks actual model invocations), while Claude Code's /cost display, status-line spend indicator, and OpenTelemetry modelUsage metrics show inflated or incorrect model attribution.

This gap matters for operators who use Claude Code's built-in cost signals to:

  • enforce team spend limits at the gateway level
  • route between model tiers based on accumulated cost thresholds
  • export OpenTelemetry cost metrics to Datadog, Grafana, or internal dashboards
  • charge-back usage to project teams based on model tier

If any of these apply to you and you were using Bedrock application-inference-profile ARNs before 2.1.218, your gateway-side cost records have been attributing all model tiers to a single ARN string. AWS-side records are clean; Claude Code-side records are not.

What to do now

Upgrade path: Pin Claude Code to >= 2.1.218. For teams using the system-managed profile (claude.ai/settings) or Bedrock enterprise deployments, confirm the update propagated to all active sessions before trusting cost metrics.

Audit scope: Historical /cost snapshots, OTel modelUsage exports, and gateway spend dashboards that relied on Claude Code's per-model cost breakdown are affected for the period your team used application-inference-profile ARNs. If you exported these metrics downstream, re-run any cost attribution or charge-back calculations for that window.

Routing policy implication: If your routing logic uses Claude Code's in-process cost signal as a model-tier selector — switching from Sonnet to Haiku when accumulated cost crosses a threshold — that logic has been operating on bad data for ARN-configured Bedrock sessions. Validate that the corrected resolution changes any thresholds you have in place.

Direct model ID fallback: If your Bedrock configuration allows it, switching to direct model IDs instead of application-inference-profile ARNs gives you immediate verifiable cost attribution without depending on ARN resolution. For teams that must use ARNs (cross-region inference, Guardrails, tagging), the 2.1.218 fix is the correct path — but verify the resolution works for your specific profile IDs before fully trusting the new cost output.

What TheRouter users should watch

The dual-layer accounting problem described here — a gateway's internal cost meter diverging from the upstream provider's billing — is not unique to Bedrock ARNs. Any router or gateway that maps upstream model identifiers to internal records can develop resolution gaps when providers change their model ID schemes. The correct architectural pattern is to resolve the upstream identifier to a canonical model ID before recording any cost or routing metric, not to use the raw upstream identifier as the accounting key.

For operators using TheRouter with Bedrock or other providers that support alias-style model references, confirm that your gateway's cost attribution resolves aliases to underlying model IDs before logging. If your internal dashboards show unexpectedly flat cost curves across model tiers, a resolution gap like this one is the first thing to check. See TheRouter's routing documentation for how model ID normalization fits into the request path.

Help & contact