Incorrect "API Usage Billing" banner when using AWS Bedrock
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Bug Report: Incorrect "API Usage Billing" banner when using AWS Bedrock
Summary
Claude Code displays "API Usage Billing" in the banner when configured to use AWS Bedrock, which is misleading. Users configured for Bedrock should see "AWS Bedrock Billing" or similar.
Environment
- Claude Code Version: 2.1.138 (latest)
- OS: macOS (Darwin 25.4.0)
- Shell: zsh
- Install Method: global
Expected Behavior
When CLAUDE_CODE_USE_BEDROCK=1 is set, the banner should display:
- "Sonnet 4.5 · AWS Bedrock Billing"
- Or: "Sonnet 4.5 · Bedrock"
- Or: "Sonnet 4.5 · Billed via AWS"
Actual Behavior
Banner displays: "Sonnet 4.5 · API Usage Billing"
This is misleading because:
- User is NOT billed via Anthropic API
- Billing goes through AWS Bedrock account
- Costs appear on AWS bill, not Anthropic invoice
Reproduction Steps
- Configure Claude Code for AWS Bedrock in
~/.claude/settings.json:
``json``
{
"env": {
"CLAUDE_CODE_USE_BEDROCK": "1",
"AWS_REGION": "us-east-1",
"AWS_PROFILE": "[YOUR_PROFILE]",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "us.anthropic.claude-sonnet-4-5-20250929-v1:0[1m]"
}
}
- Start Claude Code CLI:
``bash``
claude
- Observe banner at top of terminal
Result: Banner shows "API Usage Billing" instead of "AWS Bedrock Billing"
Evidence
Claude Code correctly:
- ✅ Uses AWS credentials (AWS_PROFILE)
- ✅ Uses Bedrock endpoints (AWS_REGION)
- ✅ Tracks usage with Bedrock model IDs (
us.anthropic.*format) - ❌ Displays incorrect billing source in banner
Model usage logs show Bedrock model format:
{
"lastModelUsage": {
"us.anthropic.claude-sonnet-4-5-20250929-v1:0[1m]": {
"inputTokens": 10,
"outputTokens": 1198,
"cacheReadInputTokens": 0,
"cacheCreationInputTokens": 16273,
"costUSD": 0.079...
}
}
}
Impact
Severity: Low (Cosmetic/Misleading)
User Impact:
- Users may think they're being billed via Anthropic API
- Users may look for charges on wrong billing account
- Corporate users may have compliance concerns about billing source
Financial Impact: None (billing works correctly, only display is wrong)
Workaround: Users can verify actual billing via AWS Console → Bedrock → Usage
Suggested Fix
Option 1: Detect Bedrock and Update Banner
// Pseudo-code
const billingSource = process.env.CLAUDE_CODE_USE_BEDROCK === '1'
? 'AWS Bedrock Billing'
: 'API Usage Billing';
const banner = `${modelName} · ${billingSource}`;
Option 2: Add Billing Source Icon
Sonnet 4.5 · 🔶 AWS Bedrock
Sonnet 4.5 · 🟣 API Billing
Option 3: Detect by Model ID Format
// Bedrock models have format: us.anthropic.*
const isBedrock = modelId.startsWith('us.anthropic.') ||
modelId.startsWith('global.anthropic.');
const billingSource = isBedrock ? 'AWS Bedrock' : 'API Usage';
Additional Context
Bedrock Model ID Format
Bedrock uses different model ID format than API:
- Bedrock:
us.anthropic.claude-sonnet-4-5-20250929-v1:0[1m] - API:
claude-sonnet-4-5-20250929
The model ID format can be used to auto-detect billing source.
Verification
To verify the fix:
- Configure Claude Code for Bedrock (as above)
- Start
claudeCLI - Check banner displays "AWS Bedrock" or similar (not "API Usage")
- Verify API users still see "API Usage Billing" (no regression)
---
Labels: bug, ui, bedrock, low-priority
What Should Happen?
When CLAUDE_CODE_USE_BEDROCK=1 is configured, the banner should display "AWS Bedrock Billing" instead of "API Usage Billing" to accurately reflect that billing goes through AWS, not Anthropic's API.
Error Messages/Logs
No error messages. This is a UI display issue.
Banner currently shows: "Sonnet 4.5 · API Usage Billing"
Should show: "Sonnet 4.5 · AWS Bedrock Billing"
Configuration evidence:
- CLAUDE_CODE_USE_BEDROCK=1
- Model ID: us.anthropic.claude-sonnet-4-5-20250929-v1:0[1m]
- AWS_REGION=us-east-1
Steps to Reproduce
- Configure ~/.claude/settings.json with:
``json``
{
"env": {
"CLAUDE_CODE_USE_BEDROCK": "1",
"AWS_REGION": "us-east-1",
"AWS_PROFILE": "[YOUR_PROFILE]"
}
}
- Start Claude Code CLI:
claude
- Observe the banner at the top of the terminal
Expected: "Sonnet 4.5 · AWS Bedrock Billing"
Actual: "Sonnet 4.5 · API Usage Billing"
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.138
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗