From 8014643f27a4176b5feca26e49f3c8f007bde4a0 Mon Sep 17 00:00:00 2001 From: Julio Quinteros Pro Date: Fri, 13 Feb 2026 05:48:16 -0300 Subject: [PATCH] fix: use None instead of Reasoning() for reasoning parameter The ResponsesAPIResponse.reasoning field expects Optional[Dict[str, Any]], not a Reasoning object. Passing an empty Reasoning() object causes a mypy type error. Fix: Pass None instead of Reasoning() since the field is optional and we're not providing any reasoning data. Fixes mypy error: Argument "reasoning" to "ResponsesAPIResponse" has incompatible type "Reasoning"; expected "dict[str, Any] | None" --- .../litellm_completion_transformation/transformation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/responses/litellm_completion_transformation/transformation.py b/litellm/responses/litellm_completion_transformation/transformation.py index 900f56fea26..dd41b73930f 100644 --- a/litellm/responses/litellm_completion_transformation/transformation.py +++ b/litellm/responses/litellm_completion_transformation/transformation.py @@ -1500,7 +1500,7 @@ class LiteLLMCompletionResponsesConfig: previous_response_id=getattr( chat_completion_response, "previous_response_id", None ), - reasoning=dict(Reasoning()), + reasoning=None, status=LiteLLMCompletionResponsesConfig._map_chat_completion_finish_reason_to_responses_status( finish_reason ),