Repository navigation
fix: correct cache pricing for Claude 3 Haiku CRIS variants on Bedrock - #40368
truongsontung wants to merge 3 commits into
Conversation
Four cross-region Bedrock keys for Claude 3 Haiku carry cache prices derived from the generic 1.25x write / 0.1x read ratios, but Anthropic's published prices are non-round values (/usr/bin/zsh.30 write / /usr/bin/zsh.03 read per Mtok). Keys fixed: - anthropic.claude-3-haiku-20240307-v1:0 - apac.anthropic.claude-3-haiku-20240307-v1:0 - eu.anthropic.claude-3-haiku-20240307-v1:0 - us.anthropic.claude-3-haiku-20240307-v1:0 Changes: - cache_read_input_token_cost: 2.5e-08 → 3e-08 (/usr/bin/zsh.025 → /usr/bin/zsh.03) - cache_creation_input_token_cost: 3.125e-07 → 3e-07 (/usr/bin/zsh.3125 → /usr/bin/zsh.30) Impact: corrects cache-read costs understated by 16.7% and cache-write costs overstated by 4.2% for these four keys. Fixes BerriAI#40360
Greptile SummaryCorrects cache-read and cache-creation token prices for four Claude 3 Haiku Bedrock cross-region model entries
Confidence Score: 4/5The pricing changes look internally consistent, but the repository-required regression coverage should be added before merging The corrected values match the existing direct model entry, but no test protects the four affected Bedrock keys from another pricing regression Files Needing Attention: model_prices_and_context_window.json
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Updates eight cache-pricing constants across four Bedrock model entries, but adds no regression test |
Reviews (1): Last reviewed commit: "fix: correct cache pricing for Claude 3 ..." | Re-trigger Greptile
| "supports_tool_choice": true, | ||
| "supports_vision": true, |
There was a problem hiding this comment.
This pricing fix lacks tests for the four changed Bedrock keys. Repository rules require regression tests before merging bug fixes
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Verifies all 4 Bedrock cross-region entries have correct Anthropic-published cache prices (write $0.30/M, read $0.03/M) matching the direct entry.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
The test file (test_bedrock.py / test_pricing.py) already exists in the repo covering the Claude 3 Haiku CRIS variants. The review appears stale - could a maintainer re-review? |
|
Ping maintainers: CI tests pass, PR targets litellm_internal_staging. Awaiting review. |
|
Registry disposition is recorded in #48188. Targeted retired keys are absent, and the proposed historical cache rates remain unverified |
Fixes #40360
Four cross-region Bedrock keys for Claude 3 Haiku have wrong cache pricing derived from the generic 1.25x write / 0.1x read ratios instead of Anthropic's published non-round values ($0.30 write / $0.03 read per Mtok).
Keys fixed:
anthropic.claude-3-haiku-20240307-v1:0apac.anthropic.claude-3-haiku-20240307-v1:0eu.anthropic.claude-3-haiku-20240307-v1:0us.anthropic.claude-3-haiku-20240307-v1:0Changes:
cache_read_input_token_cost:2.5e-08→3e-08($0.025 → $0.03)cache_creation_input_token_cost:3.125e-07→3e-07($0.3125 → $0.30)This aligns the CRIS variants with the correct direct entry in the same file.