Skip to content

Add Claude Opus 4.6#20508

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

Add Claude Opus 4.6#20508
ishaan-jaff merged 1 commit intoBerriAI:mainfrom
PeterDaveHelloKitchen:feat/add-claude-opus-4-6-model

Conversation

@PeterDaveHello
Copy link
Contributor

Relevant issues

N/A

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
    • Added: 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_utils.py::test_aaamodel_prices_and_context_window_json_is_valid tests/test_litellm/test_claude_opus_4_6_config.py tests/test_litellm/llms/bedrock/chat/test_converse_transformation.py::test_get_supported_openai_params_bedrock_converse -q
    • Result: 4 passed
  • 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

🆕 New Feature
✅ Test

Changes

  • Add Claude Opus 4.6 model metadata for:
    • Anthropic API: claude-opus-4-6
    • AWS Bedrock Converse: anthropic.claude-opus-4-6-v1:0
    • Vertex AI: vertex_ai/claude-opus-4-6
  • Add pricing and capability fields for Opus 4.6, including:
    • Base pricing
    • Long-context pricing (*_above_200k_tokens)
    • Prompt caching rates
    • supports_assistant_prefill=false
    • tool_use_system_prompt_tokens=346
  • Register anthropic.claude-opus-4-6-v1:0 in BEDROCK_CONVERSE_MODELS
  • Add targeted config test coverage for Opus 4.6 entries

References

@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 5, 2026 7:31pm

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 5, 2026

Greptile Overview

Greptile Summary

Adds support for Claude Opus 4.6 across three provider platforms (Anthropic API, AWS Bedrock Converse, and Vertex AI). The implementation adds model metadata entries with pricing, context window limits (200K input, 128K output), and capability flags.

  • All three model variants (claude-opus-4-6, anthropic.claude-opus-4-6-v1:0, vertex_ai/claude-opus-4-6) include long-context pricing (*_above_200k_tokens fields) and prompt caching support
  • Bedrock model registered in BEDROCK_CONVERSE_MODELS constant
  • Test coverage validates pricing, context limits, and capability flags across all three variants
  • Configuration follows established patterns from Opus 4.5, with key differences: increased output tokens (128K vs 64K), long-context pricing tiers, higher tool_use_system_prompt_tokens (346 vs 159), and supports_assistant_prefill=false

Confidence Score: 5/5

  • Safe to merge - adds model metadata following established patterns
  • Configuration is consistent with existing model patterns, test coverage validates all changes, and no performance-critical code paths are modified
  • No files require special attention

Important Files Changed

Filename Overview
litellm/constants.py Added anthropic.claude-opus-4-6-v1:0 to BEDROCK_CONVERSE_MODELS list
model_prices_and_context_window.json Added three Opus 4.6 model entries with pricing, context limits, and capability flags
litellm/model_prices_and_context_window_backup.json Backup file synchronized with main model configuration JSON
tests/test_litellm/test_claude_opus_4_6_config.py New test file validates Opus 4.6 model entries and Bedrock registration

Sequence Diagram

sequenceDiagram
    participant User
    participant LiteLLM
    participant ModelConfig
    participant Provider as Provider (Anthropic/Bedrock/Vertex)

    User->>LiteLLM: Request with claude-opus-4-6
    LiteLLM->>ModelConfig: Lookup model metadata
    ModelConfig-->>LiteLLM: Return pricing, limits, capabilities
    Note over ModelConfig: max_input: 200K, max_output: 128K<br/>supports_prompt_caching: true<br/>tool_use_system_prompt_tokens: 346
    LiteLLM->>Provider: Route to appropriate provider
    alt Anthropic API
        LiteLLM->>Provider: Use claude-opus-4-6
    else Bedrock Converse
        LiteLLM->>Provider: Use anthropic.claude-opus-4-6-v1:0
    else Vertex AI
        LiteLLM->>Provider: Use vertex_ai/claude-opus-4-6
    end
    Provider-->>LiteLLM: Model response
    LiteLLM->>LiteLLM: Calculate costs using pricing metadata
    Note over LiteLLM: Apply >200K pricing if applicable<br/>Apply cache pricing if used
    LiteLLM-->>User: Response with usage tracking
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.

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Member

@ishaan-jaff ishaan-jaff left a comment

Choose a reason for hiding this comment

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

lgtm

@ishaan-jaff
Copy link
Member

@PeterDaveHello please resolve merge conflicts

@marty-sullivan
Copy link
Contributor

@PeterDaveHello please also make sure you add the global. and regional (us., apac., eu. model IDs to the cost map for bedrock. They need to be explicitly added and they also are usually priced cheaper than the region-specific model ID.

@PeterDaveHello
Copy link
Contributor Author

Sure! Doing it!

Add Claude Opus 4.6 entries for Anthropic, Bedrock Converse, and Vertex AI.

Align pricing and capability metadata with Anthropic docs, including
long-context rates, above-200k prompt-caching rates, prefill removal,
and tool-use system prompt token counts.

Register the Bedrock Converse model ID in constants and add targeted
tests to validate model map values and converse registration.
@PeterDaveHello PeterDaveHello force-pushed the feat/add-claude-opus-4-6-model branch from 67e21b8 to 3d7daac Compare February 5, 2026 19:29
@PeterDaveHello
Copy link
Contributor Author

@ishaan-jaff @marty-sullivan PR updated!

Copy link
Member

@ishaan-jaff ishaan-jaff left a comment

Choose a reason for hiding this comment

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

lgtm

@ishaan-jaff ishaan-jaff merged commit dbd4bb5 into BerriAI:main Feb 5, 2026
5 of 8 checks passed
@PeterDaveHello PeterDaveHello deleted the feat/add-claude-opus-4-6-model branch February 5, 2026 19:33
ishaan-jaff pushed a commit that referenced this pull request Feb 5, 2026
Add Claude Opus 4.6 entries for Anthropic, Bedrock Converse, and Vertex AI.

Align pricing and capability metadata with Anthropic docs, including
long-context rates, above-200k prompt-caching rates, prefill removal,
and tool-use system prompt token counts.

Register the Bedrock Converse model ID in constants and add targeted
tests to validate model map values and converse registration.
@marty-sullivan
Copy link
Contributor

It looks there may have been a change in the naming convention that needs to be fixed here for bedrock. It looks like they have gotten rid of the :0 on the end of the model IDs / inference profiles. I'm currently testing, but may need to put in a fix PR
for example, model name for this one is:

anthropic.claude-opus-4-6-v1
global.anthropic.claude-opus-4-6-v1
us.anthropic.claude-opus-4-6-v1

vs:

anthropic.claude-opus-4-5-20251101-v1:0
global.anthropic.claude-opus-4-5-20251101-v1:0
us.anthropic.claude-opus-4-5-20251101-v1:0

@PeterDaveHello
Copy link
Contributor Author

Let me see what I can do for it.

@marty-sullivan
Copy link
Contributor

@PeterDaveHello thanks, I did confirm that litellm isn't picking it up properly, so the names do need to be fixed for bedrock

@PeterDaveHello
Copy link
Contributor Author

#20514

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