Skip to content

fix: add vertex sonnet 4.6 1h cache pricing - #26410

Closed
biubiubiuboomboomboom wants to merge 2 commits into
BerriAI:litellm_oss_branchfrom
biubiubiuboomboomboom:codex/vertex-sonnet-4-6-root-pricing-only
Closed

fix: add vertex sonnet 4.6 1h cache pricing#26410
biubiubiuboomboomboom wants to merge 2 commits into
BerriAI:litellm_oss_branchfrom
biubiubiuboomboomboom:codex/vertex-sonnet-4-6-root-pricing-only

Conversation

@biubiubiuboomboomboom

@biubiubiuboomboomboom biubiubiuboomboomboom commented Apr 24, 2026

Copy link
Copy Markdown

Summary

  • add cache_creation_input_token_cost_above_1hr for vertex_ai/claude-sonnet-4-6
  • add the same pricing field for vertex_ai/claude-sonnet-4-6@default

Testing

  • not run (JSON pricing map change only)

shubham-arora-clear and others added 2 commits April 23, 2026 21:54
…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>
@veria-ai

veria-ai Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Low: Pricing data update only

This PR adds a single pricing field (cache_creation_input_token_cost_above_1hr) to two existing Vertex AI model entries in the pricing JSON. No code logic, authentication, or input handling is changed.


Status: 0 open
Risk: 1/10

Posted by Veria AI · 2026-04-24T10:46:21.046Z

@greptile-apps

greptile-apps Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds the cache_creation_input_token_cost_above_1hr field (6e-06) to vertex_ai/claude-sonnet-4-6 and vertex_ai/claude-sonnet-4-6@default in the model pricing JSON. The value is consistent with analogous models (azure_ai/claude-sonnet-4-6, azure_ai/claude-sonnet-4-5, claude-3-7-sonnet-20250219, all set to 6e-06), representing a 1.6× multiplier over the standard cache-write cost.

  • The base claude-sonnet-4-6 (Anthropic provider, line 8902) and all Bedrock variants (anthropic.claude-sonnet-4-6, us.anthropic.claude-sonnet-4-6, eu.anthropic.claude-sonnet-4-6, au.anthropic.claude-sonnet-4-6) appear to be missing cache_creation_input_token_cost_above_1hr — if that cache tier applies to those providers, a follow-up PR would be needed.

Confidence Score: 4/5

Safe 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.

Important Files Changed

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]
Loading

Reviews (1): Last reviewed commit: "fix: add vertex sonnet 4.6 1h cache pric..." | Re-trigger Greptile

@codecov

codecov Bot commented Apr 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Sameerlite
Sameerlite deleted the branch BerriAI:litellm_oss_branch April 27, 2026 04:56
@Sameerlite Sameerlite closed this Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants