fix: add vertex sonnet 4.6 1h cache pricing - #26410
fix: add vertex sonnet 4.6 1h cache pricing#26410biubiubiuboomboomboom wants to merge 2 commits into
Conversation
…rriAI#25855) Bedrock enforces non-increasing TTL ordering across cache_control blocks (tools → system → messages). The tool cache_control TTL was being unconditionally dropped to the default 5m, while system blocks preserved the user-specified TTL for Claude 4.5+ models. This mismatch caused "a ttl='1h' block must not come after a ttl='5m' block" errors when users set ttl='1h' on both tools and system. Converse path: add_cache_point_tool_block() now accepts a model param and preserves TTL for Claude 4.5+, matching _get_cache_point_block(). Invoke path: _remove_ttl_from_cache_control() now also processes tools (was only processing system and messages). Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Low: Pricing data update onlyThis PR adds a single pricing field ( Status: 0 open Posted by Veria AI · 2026-04-24T10:46:21.046Z |
Greptile SummaryThis PR adds the
Confidence Score: 4/5Safe to merge; minimal, targeted pricing-only change with correct values. Only P2-level observation: the direct Anthropic provider and five Bedrock variants are missing the same field, but that omission pre-dates this PR and is out of scope here. No files require special attention.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds cache_creation_input_token_cost_above_1hr: 6e-06 to vertex_ai/claude-sonnet-4-6 and vertex_ai/claude-sonnet-4-6@default; pricing value is consistent with other sonnet-tier models on equivalent providers. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Cache write request\nvertex_ai/claude-sonnet-4-6] --> B{Cache duration?}
B -->|≤ 1 hour| C[cache_creation_input_token_cost\n$3.75/MTok = 3.75e-06]
B -->|> 1 hour| D[cache_creation_input_token_cost_above_1hr\n$6.00/MTok = 6e-06 Added by PR]
A2[Cache write request\nvertex_ai/claude-sonnet-4-6@default] --> B2{Cache duration?}
B2 -->|≤ 1 hour| C2[cache_creation_input_token_cost\n$3.75/MTok = 3.75e-06]
B2 -->|> 1 hour| D2[cache_creation_input_token_cost_above_1hr\n$6.00/MTok = 6e-06 Added by PR]
Reviews (1): Last reviewed commit: "fix: add vertex sonnet 4.6 1h cache pric..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
cd88dde to
c014bfa
Compare
Summary
cache_creation_input_token_cost_above_1hrforvertex_ai/claude-sonnet-4-6vertex_ai/claude-sonnet-4-6@defaultTesting