mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix(bedrock): let parallel_tool_calls-derived disable flag win over raw tool_choice value
This commit is contained in:
parent
6a7454271b
commit
75c0e12dac
2 changed files with 6 additions and 2 deletions
|
|
@ -1211,7 +1211,11 @@ class AmazonConverseConfig(BaseConfig):
|
|||
def _merge_parallel_tool_use_config(additional_request_params: dict, parallel_tool_use_config: dict) -> dict:
|
||||
merged_entries = {
|
||||
key: (
|
||||
{**value, **additional_request_params[key]}
|
||||
{
|
||||
**value,
|
||||
**additional_request_params[key],
|
||||
**{k: v for k, v in value.items() if k != "type"},
|
||||
}
|
||||
if isinstance(additional_request_params.get(key), dict) and isinstance(value, dict)
|
||||
else value
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4284,7 +4284,7 @@ def test_parallel_tool_calls_emits_typed_auto_tool_choice(parallel_tool_calls, e
|
|||
|
||||
def test_parallel_tool_use_merge_preserves_user_tool_choice_type():
|
||||
merged = AmazonConverseConfig._merge_parallel_tool_use_config(
|
||||
{"tool_choice": {"type": "tool", "name": "get_weather"}},
|
||||
{"tool_choice": {"type": "tool", "name": "get_weather", "disable_parallel_tool_use": False}},
|
||||
{"tool_choice": {"type": "auto", "disable_parallel_tool_use": True}},
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue