diff --git a/litellm/llms/deepseek/chat/transformation.py b/litellm/llms/deepseek/chat/transformation.py index 03f58659ca7..d6df926d19f 100644 --- a/litellm/llms/deepseek/chat/transformation.py +++ b/litellm/llms/deepseek/chat/transformation.py @@ -49,12 +49,11 @@ class DeepSeekChatConfig(OpenAIGPTConfig): # Handle thinking parameter - accept {"type": "enabled"} or {"type": "disabled"} if thinking_value is not None: - if isinstance(thinking_value, dict) and thinking_value.get( - "type" - ) in ("enabled", "disabled"): - optional_params["thinking"] = { - "type": thinking_value["type"] - } + if isinstance(thinking_value, dict) and thinking_value.get("type") in ( + "enabled", + "disabled", + ): + optional_params["thinking"] = {"type": thinking_value["type"]} # Handle reasoning_effort - map to thinking enabled/disabled elif reasoning_effort is not None: