Skip to content

[Bug] Incorrect Bedrock pricing for Claude Sonnet 4.5 - inflated by 10% #15764

@ylgibby

Description

@ylgibby

Bug Description

The pricing for Claude Sonnet 4.5 on AWS Bedrock (us.anthropic.claude-sonnet-4-5-20250929-v1:0) in model_prices_and_context_window.json is incorrect - all prices are inflated by 10% compared to AWS Bedrock's official pricing.

Current (Incorrect) Pricing in LiteLLM

"us.anthropic.claude-sonnet-4-5-20250929-v1:0": {
    "input_cost_per_token": 3.3e-06,                                    // $3.30 per million
    "output_cost_per_token": 1.65e-05,                                  // $16.50 per million
    "input_cost_per_token_above_200k_tokens": 6.6e-06,                  // $6.60 per million
    "output_cost_per_token_above_200k_tokens": 2.475e-05,               // $24.75 per million
    "cache_creation_input_token_cost": 4.125e-06,                       // $4.125 per million
    "cache_read_input_token_cost": 3.3e-07,                             // $0.33 per million
    "cache_creation_input_token_cost_above_200k_tokens": 8.25e-06,      // $8.25 per million
    "cache_read_input_token_cost_above_200k_tokens": 6.6e-07            // $0.66 per million
}

Correct AWS Bedrock Pricing

According to AWS Bedrock pricing:

Standard context (≤200K tokens):

  • Input: $3.00 per million tokens (should be 3.0e-06)
  • Output: $15.00 per million tokens (should be 1.5e-05)

Long context (>200K tokens):

  • Input: $6.00 per million tokens (should be 6.0e-06)
  • Output: $22.50 per million tokens (should be 2.25e-05)

Prompt caching:

  • Cache write: $3.75 per million tokens (should be 3.75e-06)
  • Cache read: $0.30 per million tokens (should be 3.0e-07)
  • Cache write (long context): $7.50 per million tokens (should be 7.5e-06)
  • Cache read (long context): $0.60 per million tokens (should be 6.0e-07)

Impact

This 10% inflation causes:

  1. Incorrect cost tracking and billing reports
  2. Budget limits triggering 10% earlier than intended
  3. Inaccurate cost projections for users

Proposed Fix

Update model_prices_and_context_window.json:

"us.anthropic.claude-sonnet-4-5-20250929-v1:0": {
    "input_cost_per_token": 3.0e-06,
    "output_cost_per_token": 1.5e-05,
    "input_cost_per_token_above_200k_tokens": 6.0e-06,
    "output_cost_per_token_above_200k_tokens": 2.25e-05,
    "cache_creation_input_token_cost": 3.75e-06,
    "cache_read_input_token_cost": 3.0e-07,
    "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,
    "cache_read_input_token_cost_above_200k_tokens": 6.0e-07,
    // ... rest of config
}

Additional Context

Please also verify pricing for other Claude models on Bedrock (Opus 4.1, Haiku 4.5) to ensure they match AWS's official pricing.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions