From 9d943fb167c4b9b6342f29fef22c7b045ed51687 Mon Sep 17 00:00:00 2001 From: John Bang Date: Wed, 23 Sep 2026 16:22:31 -0700 Subject: [PATCH] test(deepseek): assert tools survive relaxation --- .../llms/deepseek/chat/test_deepseek_chat_transformation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/llms/deepseek/chat/test_deepseek_chat_transformation.py b/tests/unit/llms/deepseek/chat/test_deepseek_chat_transformation.py index 85e1039c712..2dc84c5fdc0 100644 --- a/tests/unit/llms/deepseek/chat/test_deepseek_chat_transformation.py +++ b/tests/unit/llms/deepseek/chat/test_deepseek_chat_transformation.py @@ -180,12 +180,13 @@ async def test_transform_request_normalizes_tool_choice_for_thinking( monkeypatch.setattr(litellm, "drop_params", global_drop_params) config = DeepSeekChatConfig() tool_choice_param = {"tool_choice": tool_choice} if tool_choice is not None else {} + tools = [_function_tool("shell"), _function_tool("read_file")] request = { "model": model, "messages": [{"role": "user", "content": "hi"}], "optional_params": { "thinking": thinking, - "tools": [_function_tool("shell"), _function_tool("read_file")], + "tools": tools, **tool_choice_param, }, "litellm_params": {"drop_params": request_drop_params}, @@ -199,6 +200,7 @@ async def test_transform_request_normalizes_tool_choice_for_thinking( ) assert body.get("tool_choice") == expected + assert body["tools"] == tools @pytest.mark.parametrize("is_async", [False, True])