Align Claude Opus 4.6 metadata and limits#20514
Conversation
Unify follow-up fixes for Opus 4.6 pricing and routing metadata into a single changeset. Set long-context-capable Opus 4.6 entries to 1M input tokens where >200K pricing is defined, align alias and dated capability metadata, and add Bedrock Converse v1 IDs with and without :0 suffixes. Keep regional endpoint pricing at a 10% premium over global entries and mirror all cost-map changes in the backup file used for local loading and offline fallback behavior. Extend Opus 4.6 regression tests to verify metadata parity, Bedrock regional pricing parity across :0 and non-:0 IDs, and converse model registration in constants and runtime model sets.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile OverviewGreptile SummaryAligns Claude Opus 4.6 model metadata and adds Bedrock Converse aliases without version suffix for improved routing flexibility. Changes include updating token limits from 200k to 1M for all Opus 4.6 entries with long-context pricing, aligning metadata across alias and dated models, adding 5 new Bedrock Converse aliases (base, global, regional variants), preserving regional pricing premiums, and expanding test coverage for pricing parity and model registration. Azure AI remains at 200k tokens due to lack of long-context pricing configuration. Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds Bedrock aliases for Opus 4.6, aligns max tokens to 1M for long-context variants, updates metadata |
| litellm/model_prices_and_context_window_backup.json | Mirrors the main JSON file changes identically |
| tests/test_litellm/test_claude_opus_4_6_config.py | Expands test coverage for non-:0 Bedrock aliases, validates pricing parity, adds metadata consistency test between alias and dated model |
Sequence Diagram
sequenceDiagram
participant User
participant LiteLLM
participant ModelCostMap
participant BedrockConverse
Note over User,BedrockConverse: PR Changes: Add non-:0 Bedrock aliases for Claude Opus 4.6
User->>LiteLLM: Request with model="anthropic.claude-opus-4-6-v1"
LiteLLM->>ModelCostMap: Load model_prices_and_context_window.json
ModelCostMap-->>LiteLLM: Model config (litellm_provider: bedrock_converse)
Note over ModelCostMap: New entries added:<br/>- anthropic.claude-opus-4-6-v1<br/>- global.anthropic.claude-opus-4-6-v1<br/>- us/eu/apac.anthropic.claude-opus-4-6-v1
LiteLLM->>LiteLLM: add_known_models() runs
Note over LiteLLM: Automatically adds models with<br/>litellm_provider="bedrock_converse"<br/>to bedrock_converse_models set
LiteLLM->>BedrockConverse: Route to Bedrock Converse API
Note over BedrockConverse: Uses aligned metadata:<br/>- max_input_tokens: 1M<br/>- supports_assistant_prefill: false<br/>- tool_use_system_prompt_tokens: 346
BedrockConverse-->>LiteLLM: Response
LiteLLM->>LiteLLM: Calculate cost with regional pricing
Note over LiteLLM: Regional pricing (10% premium):<br/>us/eu/apac vs global
LiteLLM-->>User: Response with accurate cost
|
@PeterDaveHello Thanks for jumping on this. AWS has also updated their pricing page to include Opus 4.6. I do see there are pricing differences between the regional endpoint and the inference profiles, so do make sure these are also aligned: |
|
Also, I assume the
instead of:
|
|
@PeterDaveHello please address the comment above |
…iAI#20514) This commit consolidates the Bedrock configuration for Claude Opus 4.6: - Align metadata and limits across alias and dated model entries - Set max_input_tokens to 1M for entries with long-context pricing - Add Bedrock v1 aliases (non-:0 suffixed model IDs) for Opus 4.6 - Extend regression tests to validate alias entries and pricing consistency Ensures deterministic capability metadata and proper token limits across all Opus 4.6 model name variants in both Bedrock Converse and Invoke APIs.
|
bump @PeterDaveHello |
a7c7d9d to
020be08
Compare
020be08 to
e882296
Compare
Relevant issues
#20506 #20508
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/directory, Adding at least 1 test is a hard requirement - see detailstests/test_litellm/test_claude_opus_4_6_config.pymake test-unitpoetry run pytest tests/test_litellm/test_claude_opus_4_6_config.py -qpoetry run pytest tests/test_litellm/test_utils.py::test_aaamodel_prices_and_context_window_json_is_valid tests/test_litellm/llms/bedrock/chat/test_converse_transformation.py::test_get_supported_openai_params_bedrock_converse -q4 passed in 0.18s2 passed in 0.59sCI (LiteLLM team)
Branch creation CI run
Link:
CI run for the last commit
Link:
Merge / cherry-pick CI run
Links:
Type
🐛 Bug Fix
✅ Test
Commits in this PR (
main..HEAD)7f5116c0ecAlign Claude Opus 4.6 metadata and limitsee53bcdf76Add Bedrock v1 aliases for Claude Opus 4.6Changes
Align Claude Opus 4.6 metadata and long-context limits
claude-opus-4-6andclaude-opus-4-6-20260205capability metadata:supports_assistant_prefill=falsetool_use_system_prompt_tokens=346max_input_tokens=1000000for Opus 4.6 entries that include*_above_200k_tokenspricing::0base/global/regional IDsmax_input_tokens=200000(no long-context pricing fields configured)Add Bedrock Converse Opus 4.6 aliases without
:0anthropic.claude-opus-4-6-v1global.anthropic.claude-opus-4-6-v1us.anthropic.claude-opus-4-6-v1eu.anthropic.claude-opus-4-6-v1apac.anthropic.claude-opus-4-6-v1model_prices_and_context_window.jsonlitellm/model_prices_and_context_window_backup.jsonExtend regression coverage
:0and non-:0IDsNotes