Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
30 changes: 20 additions & 10 deletions litellm/model_prices_and_context_window_backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"global.anthropic.claude-fable-5": {
"cache_creation_input_token_cost": 1.25e-05,
Expand Down Expand Up @@ -1408,7 +1409,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"us.anthropic.claude-fable-5": {
"cache_creation_input_token_cost": 1.375e-05,
Expand Down Expand Up @@ -1442,7 +1444,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"eu.anthropic.claude-fable-5": {
"cache_creation_input_token_cost": 1.375e-05,
Expand Down Expand Up @@ -1476,7 +1479,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"anthropic.claude-opus-4-8": {
"bedrock_converse_supports_strict_tools": false,
Expand Down Expand Up @@ -1718,7 +1722,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"global.anthropic.claude-sonnet-5": {
"cache_creation_input_token_cost": 2.5e-06,
Expand Down Expand Up @@ -1752,7 +1757,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"us.anthropic.claude-sonnet-5": {
"cache_creation_input_token_cost": 2.75e-06,
Expand Down Expand Up @@ -1786,7 +1792,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"eu.anthropic.claude-sonnet-5": {
"cache_creation_input_token_cost": 2.75e-06,
Expand Down Expand Up @@ -1820,7 +1827,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"au.anthropic.claude-sonnet-5": {
"cache_creation_input_token_cost": 2.75e-06,
Expand Down Expand Up @@ -1854,7 +1862,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"jp.anthropic.claude-sonnet-5": {
"cache_creation_input_token_cost": 2.75e-06,
Expand Down Expand Up @@ -1888,7 +1897,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"anthropic.claude-sonnet-4-6": {
"supports_adaptive_thinking": true,
Expand Down
30 changes: 20 additions & 10 deletions model_prices_and_context_window.json
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"global.anthropic.claude-fable-5": {
"cache_creation_input_token_cost": 1.25e-05,
Expand Down Expand Up @@ -1408,7 +1409,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"us.anthropic.claude-fable-5": {
"cache_creation_input_token_cost": 1.375e-05,
Expand Down Expand Up @@ -1442,7 +1444,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"eu.anthropic.claude-fable-5": {
"cache_creation_input_token_cost": 1.375e-05,
Expand Down Expand Up @@ -1476,7 +1479,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"anthropic.claude-opus-4-8": {
"bedrock_converse_supports_strict_tools": false,
Expand Down Expand Up @@ -1718,7 +1722,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"global.anthropic.claude-sonnet-5": {
"cache_creation_input_token_cost": 2.5e-06,
Expand Down Expand Up @@ -1752,7 +1757,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"us.anthropic.claude-sonnet-5": {
"cache_creation_input_token_cost": 2.75e-06,
Expand Down Expand Up @@ -1786,7 +1792,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"eu.anthropic.claude-sonnet-5": {
"cache_creation_input_token_cost": 2.75e-06,
Expand Down Expand Up @@ -1820,7 +1827,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"au.anthropic.claude-sonnet-5": {
"cache_creation_input_token_cost": 2.75e-06,
Expand Down Expand Up @@ -1854,7 +1862,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"jp.anthropic.claude-sonnet-5": {
"cache_creation_input_token_cost": 2.75e-06,
Expand Down Expand Up @@ -1888,7 +1897,8 @@
"supports_max_reasoning_effort": true,
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true
"supports_parallel_tool_use_config": true,
"bedrock_converse_supports_strict_tools": false
},
"anthropic.claude-sonnet-4-6": {
"supports_adaptive_thinking": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,28 @@
"bedrock/us.anthropic.claude-sonnet-4-20250514-v1:0",
"bedrock/eu.anthropic.claude-sonnet-4-20250514-v1:0",
"bedrock/apac.anthropic.claude-sonnet-4-20250514-v1:0",
# Sonnet 5 rejects toolSpec.strict on Bedrock Converse too (verified
# against a live Converse call: strict -> ValidationException
# "tools.0.custom.strict: Extra inputs are not permitted", stripped -> 200).
"anthropic.claude-sonnet-5",
"bedrock/global.anthropic.claude-sonnet-5",
"bedrock/us.anthropic.claude-sonnet-5",
"bedrock/eu.anthropic.claude-sonnet-5",
"bedrock/au.anthropic.claude-sonnet-5",
"bedrock/jp.anthropic.claude-sonnet-5",
# Fable 5 likewise rejects toolSpec.strict on Bedrock Converse (verified
# live: strict -> "tools.0.custom.strict: Extra inputs are not permitted",
# stripped -> 200).
"anthropic.claude-fable-5",
"bedrock/global.anthropic.claude-fable-5",
"bedrock/us.anthropic.claude-fable-5",
"bedrock/eu.anthropic.claude-fable-5",
],
)
def test_bedrock_tools_pt_strict_dropped_for_strict_unsupported_models(
model_id: str,
) -> None:
"""Opus 4.7/4.8 and Sonnet 4 reject toolSpec.strict and additionalProperties."""
"""Opus 4.7/4.8, Sonnet 4, Sonnet 5, and Fable 5 reject toolSpec.strict and additionalProperties."""
result = _bedrock_tools_pt(_STRICT_TOOL, model=model_id)
tool_spec = result[0]["toolSpec"]
assert (
Expand Down Expand Up @@ -129,6 +145,11 @@ def test_bedrock_converse_supports_strict_tools_helper() -> None:
)
is False
)
# Sonnet 5 and Fable 5 reject strict on Bedrock Converse too
assert bedrock_converse_supports_strict_tools("bedrock/us.anthropic.claude-sonnet-5") is False
assert bedrock_converse_supports_strict_tools("anthropic.claude-sonnet-5") is False
assert bedrock_converse_supports_strict_tools("bedrock/us.anthropic.claude-fable-5") is False
assert bedrock_converse_supports_strict_tools("anthropic.claude-fable-5") is False


@pytest.mark.parametrize(
Expand All @@ -143,6 +164,16 @@ def test_bedrock_converse_supports_strict_tools_helper() -> None:
"us.anthropic.claude-sonnet-4-20250514-v1:0",
"eu.anthropic.claude-sonnet-4-20250514-v1:0",
"apac.anthropic.claude-sonnet-4-20250514-v1:0",
"anthropic.claude-sonnet-5",
"global.anthropic.claude-sonnet-5",
"us.anthropic.claude-sonnet-5",
"eu.anthropic.claude-sonnet-5",
"au.anthropic.claude-sonnet-5",
"jp.anthropic.claude-sonnet-5",
"anthropic.claude-fable-5",
"global.anthropic.claude-fable-5",
"us.anthropic.claude-fable-5",
"eu.anthropic.claude-fable-5",
],
)
def test_strict_tools_flag_set_in_model_cost_map(cost_map_key: str) -> None:
Expand Down
Loading