mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
Fix au.anthropic.claude opus 4 6 v1 (#20731)
* Fix apac.anthropic.claude-opus-4-6-v1 -> au.anthropic.claude-opus-4-6-v1 * Add test for Australia region au. prefix (not apac.)
This commit is contained in:
parent
a5e8eb6848
commit
9e8d1a2b4f
3 changed files with 41 additions and 14 deletions
|
|
@ -1083,7 +1083,7 @@
|
|||
"supports_vision": true,
|
||||
"tool_use_system_prompt_tokens": 346
|
||||
},
|
||||
"apac.anthropic.claude-opus-4-6-v1": {
|
||||
"au.anthropic.claude-opus-4-6-v1": {
|
||||
"cache_creation_input_token_cost": 6.875e-06,
|
||||
"cache_creation_input_token_cost_above_200k_tokens": 1.375e-05,
|
||||
"cache_read_input_token_cost": 5.5e-07,
|
||||
|
|
|
|||
|
|
@ -1083,7 +1083,7 @@
|
|||
"supports_vision": true,
|
||||
"tool_use_system_prompt_tokens": 346
|
||||
},
|
||||
"apac.anthropic.claude-opus-4-6-v1": {
|
||||
"au.anthropic.claude-opus-4-6-v1": {
|
||||
"cache_creation_input_token_cost": 6.875e-06,
|
||||
"cache_creation_input_token_cost_above_200k_tokens": 1.375e-05,
|
||||
"cache_read_input_token_cost": 5.5e-07,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,43 @@ import os
|
|||
import litellm
|
||||
|
||||
|
||||
def test_opus_4_6_australia_region_uses_au_prefix_not_apac():
|
||||
"""
|
||||
Test that Australia region uses 'au.' prefix instead of incorrect 'apac.' prefix.
|
||||
|
||||
AWS Bedrock cross-region inference uses specific regional prefixes:
|
||||
- 'us.' for United States
|
||||
- 'eu.' for Europe
|
||||
- 'au.' for Australia (ap-southeast-2)
|
||||
- 'apac.' for Asia-Pacific (Singapore, ap-southeast-1)
|
||||
|
||||
This test ensures the Claude Opus 4.6 model correctly uses 'au.' for Australia,
|
||||
and that 'apac.' is NOT incorrectly used for Australia region.
|
||||
|
||||
Related: The 'apac.' prefix is valid for Asia-Pacific (Singapore) region models,
|
||||
but should not be used for Australia which has its own 'au.' prefix.
|
||||
"""
|
||||
json_path = os.path.join(os.path.dirname(__file__), "../../model_prices_and_context_window.json")
|
||||
with open(json_path) as f:
|
||||
model_data = json.load(f)
|
||||
|
||||
# Verify au.anthropic.claude-opus-4-6-v1 exists (correct)
|
||||
assert "au.anthropic.claude-opus-4-6-v1" in model_data, \
|
||||
"Missing Australia region model: au.anthropic.claude-opus-4-6-v1"
|
||||
|
||||
# Verify apac.anthropic.claude-opus-4-6-v1 does NOT exist (incorrect)
|
||||
assert "apac.anthropic.claude-opus-4-6-v1" not in model_data, \
|
||||
"Incorrect model entry exists: apac.anthropic.claude-opus-4-6-v1 should be au.anthropic.claude-opus-4-6-v1"
|
||||
|
||||
# Verify the au. model is registered in bedrock_converse_models
|
||||
assert "au.anthropic.claude-opus-4-6-v1" in litellm.bedrock_converse_models, \
|
||||
"au.anthropic.claude-opus-4-6-v1 not registered in bedrock_converse_models"
|
||||
|
||||
# Verify apac. is NOT registered for this model
|
||||
assert "apac.anthropic.claude-opus-4-6-v1" not in litellm.bedrock_converse_models, \
|
||||
"apac.anthropic.claude-opus-4-6-v1 should not be in bedrock_converse_models"
|
||||
|
||||
|
||||
def test_opus_4_6_model_pricing_and_capabilities():
|
||||
json_path = os.path.join(os.path.dirname(__file__), "../../model_prices_and_context_window.json")
|
||||
with open(json_path) as f:
|
||||
|
|
@ -112,17 +149,7 @@ def test_opus_4_6_bedrock_regional_model_pricing():
|
|||
"cache_creation_input_token_cost_above_200k_tokens": 1.375e-05,
|
||||
"cache_read_input_token_cost_above_200k_tokens": 1.1e-06,
|
||||
},
|
||||
"apac.anthropic.claude-opus-4-6-v1": {
|
||||
"input_cost_per_token": 5.5e-06,
|
||||
"output_cost_per_token": 2.75e-05,
|
||||
"cache_creation_input_token_cost": 6.875e-06,
|
||||
"cache_read_input_token_cost": 5.5e-07,
|
||||
"input_cost_per_token_above_200k_tokens": 1.1e-05,
|
||||
"output_cost_per_token_above_200k_tokens": 4.125e-05,
|
||||
"cache_creation_input_token_cost_above_200k_tokens": 1.375e-05,
|
||||
"cache_read_input_token_cost_above_200k_tokens": 1.1e-06,
|
||||
},
|
||||
"apac.anthropic.claude-opus-4-6-v1": {
|
||||
"au.anthropic.claude-opus-4-6-v1": {
|
||||
"input_cost_per_token": 5.5e-06,
|
||||
"output_cost_per_token": 2.75e-05,
|
||||
"cache_creation_input_token_cost": 6.875e-06,
|
||||
|
|
@ -180,4 +207,4 @@ def test_opus_4_6_bedrock_converse_registration():
|
|||
assert "global.anthropic.claude-opus-4-6-v1" in litellm.bedrock_converse_models
|
||||
assert "us.anthropic.claude-opus-4-6-v1" in litellm.bedrock_converse_models
|
||||
assert "eu.anthropic.claude-opus-4-6-v1" in litellm.bedrock_converse_models
|
||||
assert "apac.anthropic.claude-opus-4-6-v1" in litellm.bedrock_converse_models
|
||||
assert "au.anthropic.claude-opus-4-6-v1" in litellm.bedrock_converse_models
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue