This commit is contained in:
DDDonut 2026-09-01 10:14:42 +08:00 committed by GitHub
commit a06534145d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -599,7 +599,7 @@ class AmazonConverseConfig(BaseConfig):
message=f"Bedrock doesn't support tool_choice={tool_choice}. To drop it from the call, set `litellm.drop_params = True.",
status_code=400,
)
elif tool_choice == "required":
elif tool_choice == "required" or tool_choice == "any":
return ToolChoiceValuesBlock(any={})
elif tool_choice == "auto":
return ToolChoiceValuesBlock(auto={})

View file

@ -4622,6 +4622,7 @@ def test_parallel_tool_calls_emits_typed_auto_tool_choice(parallel_tool_calls, e
[
("auto", {"auto": {}}),
("required", {"any": {}}),
("any", {"any": {}}),
({"type": "function", "function": {"name": "get_current_weather"}}, {"tool": {"name": "get_current_weather"}}),
],
)