Skip to content

[Feat] add claude-opus-4-6 to model cost map#20506

Merged
ishaan-jaff merged 3 commits intomainfrom
litellm_add_claude_opus_4_6
Feb 5, 2026
Merged

[Feat] add claude-opus-4-6 to model cost map#20506
ishaan-jaff merged 3 commits intomainfrom
litellm_add_claude_opus_4_6

Conversation

@ishaan-jaff
Copy link
Member

@ishaan-jaff ishaan-jaff commented Feb 5, 2026

[Feat] add claude-opus-4-6 to model cost map

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
  • My PR passes all unit tests on make test-unit
  • 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

@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 6:40pm

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 5, 2026

Greptile Overview

Greptile Summary

Added support for claude-opus-4-6 model with four variants (claude-opus-4-6, claude-opus-4-6-20260205, anthropic.claude-opus-4-6-20260205-v1:0, and azure_ai/claude-opus-4-6).

Key changes:

  • Set max_output_tokens to 128,000 (double the 64,000 limit of opus 4.5)
  • Maintained same pricing as opus 4.5: $5/MTok input, $25/MTok output
  • Enabled all feature flags: reasoning, computer use, vision, prompt caching, etc.
  • Both JSON files (main and backup) updated identically

Note: The PR checklist indicates tests have not been added yet, which is marked as a hard requirement in the contributing guidelines.

Confidence Score: 4/5

  • Safe to merge with low risk - simple data addition following established patterns
  • Configuration changes are straightforward and follow the exact pattern of existing opus models. JSON structure is valid and both files are synchronized. Minor deduction for missing tests mentioned in PR requirements.
  • No files require special attention - both JSON files have identical, valid changes

Important Files Changed

Filename Overview
model_prices_and_context_window.json Added four claude-opus-4-6 model variants with 128k max output tokens (double opus 4.5's 64k limit)
litellm/model_prices_and_context_window_backup.json Identical changes to main JSON file - added four claude-opus-4-6 model variants

Sequence Diagram

sequenceDiagram
    participant User
    participant LiteLLM
    participant CostMap as model_prices_and_context_window.json
    participant Provider as Anthropic API
    
    User->>LiteLLM: completion(model="claude-opus-4-6")
    LiteLLM->>CostMap: lookup "claude-opus-4-6"
    CostMap-->>LiteLLM: return pricing & config<br/>(max_output: 128k, input: $5/MTok)
    LiteLLM->>LiteLLM: validate max_tokens <= 128000
    LiteLLM->>Provider: forward request to Anthropic
    Provider-->>LiteLLM: response with token usage
    LiteLLM->>CostMap: calculate cost using<br/>input_cost_per_token & output_cost_per_token
    LiteLLM-->>User: response + calculated 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.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@PeterDaveHello
Copy link
Contributor

#20508 could be more complete than this one?

@ishaan-jaff ishaan-jaff merged commit eae5fa1 into main Feb 5, 2026
56 of 66 checks passed
ishaan-jaff added a commit that referenced this pull request Feb 5, 2026
* add claude-opus-4-6 to model cost map

* fix azure_ai

* new model
ssadedin added a commit to ssadedin/litellm that referenced this pull request Feb 6, 2026
Notes: General support for Opus 4.6 was added in BerriAI#20506 however
it omitted the AU (australian) specific instance profile used
in Bedrock. This change only adds the the au id. It is copied
from the US model settings which is consistent with past
additions of this regional model profile.
ishaan-jaff pushed a commit that referenced this pull request Feb 7, 2026
Notes: General support for Opus 4.6 was added in #20506 however
it omitted the AU (australian) specific instance profile used
in Bedrock. This change only adds the the au id. It is copied
from the US model settings which is consistent with past
additions of this regional model profile.
ishaan-jaff pushed a commit that referenced this pull request Feb 11, 2026
Notes: General support for Opus 4.6 was added in #20506 however
it omitted the AU (australian) specific instance profile used
in Bedrock. This change only adds the the au id. It is copied
from the US model settings which is consistent with past
additions of this regional model profile.
Sameerlite pushed a commit that referenced this pull request Feb 13, 2026
Notes: General support for Opus 4.6 was added in #20506 however
it omitted the AU (australian) specific instance profile used
in Bedrock. This change only adds the the au id. It is copied
from the US model settings which is consistent with past
additions of this regional model profile.
ishaan-jaff pushed a commit that referenced this pull request Feb 18, 2026
Notes: General support for Opus 4.6 was added in #20506 however
it omitted the AU (australian) specific instance profile used
in Bedrock. This change only adds the the au id. It is copied
from the US model settings which is consistent with past
additions of this regional model profile.
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.

2 participants