Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions litellm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ def identify(event_details):
config_path = None
vertex_ai_safety_settings: Optional[dict] = None
BEDROCK_CONVERSE_MODELS = [
"anthropic.claude-opus-4-20250514-v1:0",

Copilot AI May 22, 2025

Copy link

Choose a reason for hiding this comment

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

Only the global anthropic.claude-* IDs are added here, but region-specific variants (us.anthropic.* and eu.anthropic.*) won’t be recognized by identify(). Add those IDs to BEDROCK_CONVERSE_MODELS as well.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

our logic internally handles this

"anthropic.claude-sonnet-4-20250514-v1:0",
"anthropic.claude-3-7-sonnet-20250219-v1:0",
"anthropic.claude-3-5-haiku-20241022-v1:0",
"anthropic.claude-3-5-sonnet-20241022-v2:0",
Expand Down
208 changes: 208 additions & 0 deletions litellm/model_prices_and_context_window_backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -4684,6 +4684,58 @@
"deprecation_date": "2025-06-01",
"supports_tool_choice": true
},
"claude-opus-4-20250514": {
"max_tokens": 128000,
"max_input_tokens": 200000,
"max_output_tokens": 128000,
"input_cost_per_token": 15e-6,
"output_cost_per_token": 75e-6,
"search_context_cost_per_query": {
"search_context_size_low": 1e-2,
"search_context_size_medium": 1e-2,
"search_context_size_high": 1e-2
},
"cache_creation_input_token_cost": 18.75e-6,
"cache_read_input_token_cost": 1.5e-6,
"litellm_provider": "anthropic",
"mode": "chat",
"supports_function_calling": true,
"supports_vision": true,
"tool_use_system_prompt_tokens": 159,
"supports_assistant_prefill": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"supports_computer_use": true
},
"claude-sonnet-4-20250514": {
"max_tokens": 128000,
"max_input_tokens": 200000,
"max_output_tokens": 128000,
"input_cost_per_token": 3e-6,
"output_cost_per_token": 15e-6,
"search_context_cost_per_query": {
"search_context_size_low": 1e-2,
"search_context_size_medium": 1e-2,
"search_context_size_high": 1e-2
},
"cache_creation_input_token_cost": 3.75e-6,
"cache_read_input_token_cost": 0.3e-6,
"litellm_provider": "anthropic",
"mode": "chat",
"supports_function_calling": true,
"supports_vision": true,
"tool_use_system_prompt_tokens": 159,
"supports_assistant_prefill": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"supports_computer_use": true
},
"claude-3-7-sonnet-latest": {
"supports_computer_use": true,
"max_tokens": 128000,
Expand Down Expand Up @@ -9332,6 +9384,58 @@
"supports_pdf_input": true,
"supports_tool_choice": true
},
"anthropic.claude-opus-4-20250514-v1:0": {
"max_tokens": 128000,
"max_input_tokens": 200000,
"max_output_tokens": 128000,
"input_cost_per_token": 15e-6,
"output_cost_per_token": 75e-6,
"search_context_cost_per_query": {
"search_context_size_low": 1e-2,
"search_context_size_medium": 1e-2,
"search_context_size_high": 1e-2
},
"cache_creation_input_token_cost": 18.75e-6,
"cache_read_input_token_cost": 1.5e-6,
"litellm_provider": "anthropic",
"mode": "chat",
"supports_function_calling": true,
"supports_vision": true,
"tool_use_system_prompt_tokens": 159,
"supports_assistant_prefill": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"supports_computer_use": true
},
"anthropic.claude-sonnet-4-20250514-v1:0": {
"max_tokens": 128000,
"max_input_tokens": 200000,
"max_output_tokens": 128000,
"input_cost_per_token": 3e-6,
"output_cost_per_token": 15e-6,
"search_context_cost_per_query": {
"search_context_size_low": 1e-2,
"search_context_size_medium": 1e-2,
"search_context_size_high": 1e-2
},
"cache_creation_input_token_cost": 3.75e-6,
"cache_read_input_token_cost": 0.3e-6,
"litellm_provider": "anthropic",
"mode": "chat",
"supports_function_calling": true,
"supports_vision": true,
"tool_use_system_prompt_tokens": 159,
"supports_assistant_prefill": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"supports_computer_use": true
},
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
"supports_computer_use": true,
"max_tokens": 8192,
Expand Down Expand Up @@ -9482,6 +9586,58 @@
"supports_tool_choice": true,
"supports_reasoning": true
},
"us.anthropic.claude-opus-4-20250514-v1:0": {
"max_tokens": 128000,
"max_input_tokens": 200000,
"max_output_tokens": 128000,
"input_cost_per_token": 15e-6,
"output_cost_per_token": 75e-6,
"search_context_cost_per_query": {
"search_context_size_low": 1e-2,
"search_context_size_medium": 1e-2,
"search_context_size_high": 1e-2
},
"cache_creation_input_token_cost": 18.75e-6,
"cache_read_input_token_cost": 1.5e-6,
"litellm_provider": "anthropic",
"mode": "chat",
"supports_function_calling": true,
"supports_vision": true,
"tool_use_system_prompt_tokens": 159,
"supports_assistant_prefill": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"supports_computer_use": true
},
"us.anthropic.claude-sonnet-4-20250514-v1:0": {
"max_tokens": 128000,
"max_input_tokens": 200000,
"max_output_tokens": 128000,
"input_cost_per_token": 3e-6,
"output_cost_per_token": 15e-6,
"search_context_cost_per_query": {
"search_context_size_low": 1e-2,
"search_context_size_medium": 1e-2,
"search_context_size_high": 1e-2
},
"cache_creation_input_token_cost": 3.75e-6,
"cache_read_input_token_cost": 0.3e-6,
"litellm_provider": "anthropic",
"mode": "chat",
"supports_function_calling": true,
"supports_vision": true,
"tool_use_system_prompt_tokens": 159,
"supports_assistant_prefill": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"supports_computer_use": true
},
"us.anthropic.claude-3-haiku-20240307-v1:0": {
"max_tokens": 4096,
"max_input_tokens": 200000,
Expand Down Expand Up @@ -9603,6 +9759,58 @@
"supports_pdf_input": true,
"supports_tool_choice": true
},
"eu.anthropic.claude-opus-4-20250514-v1:0": {
"max_tokens": 128000,
"max_input_tokens": 200000,
"max_output_tokens": 128000,
"input_cost_per_token": 15e-6,
"output_cost_per_token": 75e-6,
"search_context_cost_per_query": {
"search_context_size_low": 1e-2,
"search_context_size_medium": 1e-2,
"search_context_size_high": 1e-2
},
"cache_creation_input_token_cost": 18.75e-6,
"cache_read_input_token_cost": 1.5e-6,
"litellm_provider": "anthropic",
"mode": "chat",
"supports_function_calling": true,
"supports_vision": true,
"tool_use_system_prompt_tokens": 159,
"supports_assistant_prefill": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"supports_computer_use": true
},
"eu.anthropic.claude-sonnet-4-20250514-v1:0": {
"max_tokens": 128000,
"max_input_tokens": 200000,
"max_output_tokens": 128000,
"input_cost_per_token": 3e-6,
"output_cost_per_token": 15e-6,
"search_context_cost_per_query": {
"search_context_size_low": 1e-2,
"search_context_size_medium": 1e-2,
"search_context_size_high": 1e-2
},
"cache_creation_input_token_cost": 3.75e-6,
"cache_read_input_token_cost": 0.3e-6,
"litellm_provider": "anthropic",
"mode": "chat",
"supports_function_calling": true,
"supports_vision": true,
"tool_use_system_prompt_tokens": 159,
"supports_assistant_prefill": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"supports_computer_use": true
},
"eu.anthropic.claude-3-5-haiku-20241022-v1:0": {
"max_tokens": 8192,
"max_input_tokens": 200000,
Expand Down
Loading