Skip to content

Align Claude Opus 4.6 metadata and limits#20514

Merged
Sameerlite merged 1 commit intoBerriAI:mainfrom
PeterDaveHelloKitchen:feat/add-claude-opus-4-6-model
Feb 6, 2026
Merged

Align Claude Opus 4.6 metadata and limits#20514
Sameerlite merged 1 commit intoBerriAI:mainfrom
PeterDaveHelloKitchen:feat/add-claude-opus-4-6-model

Conversation

@PeterDaveHello
Copy link
Contributor

Relevant issues

#20506 #20508

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
    • Updated: tests/test_litellm/test_claude_opus_4_6_config.py
  • My PR passes all unit tests on make test-unit
    • Ran targeted tests for this change:
      • poetry run pytest tests/test_litellm/test_claude_opus_4_6_config.py -q
      • poetry 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 -q
    • Results:
      • 4 passed in 0.18s
      • 2 passed in 0.59s
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • 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)

  • 7f5116c0ec Align Claude Opus 4.6 metadata and limits
  • ee53bcdf76 Add Bedrock v1 aliases for Claude Opus 4.6

Changes

  1. Align Claude Opus 4.6 metadata and long-context limits

    • Align claude-opus-4-6 and claude-opus-4-6-20260205 capability metadata:
      • supports_assistant_prefill=false
      • tool_use_system_prompt_tokens=346
    • Set max_input_tokens=1000000 for Opus 4.6 entries that include *_above_200k_tokens pricing:
      • Anthropic alias + dated ID
      • Bedrock Converse :0 base/global/regional IDs
      • Vertex AI Opus 4.6
    • Keep Azure AI Opus 4.6 at max_input_tokens=200000 (no long-context pricing fields configured)
  2. Add Bedrock Converse Opus 4.6 aliases without :0

    • Add explicit pricing entries for:
      • anthropic.claude-opus-4-6-v1
      • global.anthropic.claude-opus-4-6-v1
      • us.anthropic.claude-opus-4-6-v1
      • eu.anthropic.claude-opus-4-6-v1
      • apac.anthropic.claude-opus-4-6-v1
    • Preserve global vs regional pricing split (regional entries include the 10% premium)
    • Mirror all entries in both:
      • model_prices_and_context_window.json
      • litellm/model_prices_and_context_window_backup.json
  3. Extend regression coverage

    • Validate alias vs dated Opus 4.6 metadata parity
    • Validate Bedrock global/regional pricing for both :0 and non-:0 IDs
    • Validate Bedrock Converse model registration for Opus 4.6 IDs

Notes

  • This is a follow-up PR on top of the initial Opus 4.6 model addition, focused on consistency and routing/cost-map correctness.
  • The scope is intentionally limited to Opus 4.6 mappings and related tests only.

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.
@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Feb 6, 2026 6:42am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 5, 2026

Greptile Overview

Greptile Summary

Aligns 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

  • This PR is safe to merge with minimal risk
  • The changes are purely configuration updates to model pricing and metadata, fully covered by tests. Regional pricing calculations are mathematically correct (10% premium verified). Both JSON files are identical. The new models will be automatically registered via existing infrastructure. No code logic changes, no breaking changes.
  • No files require special attention

Important Files Changed

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
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@marty-sullivan
Copy link
Contributor

@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:

https://aws.amazon.com/bedrock/pricing/

@marty-sullivan
Copy link
Contributor

Also, I assume the litellm/constants.py for bedrock converse models also needs to be aligned with

anthropic.claude-opus-4-6-v1

instead of:

anthropic.claude-opus-4-6-v1:0

@ishaan-jaff
Copy link
Member

@PeterDaveHello please address the comment above

Quentin-M added a commit to Quentin-M/litellm that referenced this pull request Feb 5, 2026
…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.
@ishaan-jaff
Copy link
Member

bump @PeterDaveHello

@PeterDaveHello PeterDaveHello force-pushed the feat/add-claude-opus-4-6-model branch from a7c7d9d to 020be08 Compare February 6, 2026 06:39
@PeterDaveHello PeterDaveHello force-pushed the feat/add-claude-opus-4-6-model branch from 020be08 to e882296 Compare February 6, 2026 06:41
@Sameerlite Sameerlite merged commit d07c878 into BerriAI:main Feb 6, 2026
5 of 8 checks passed
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.

4 participants