From cb925416989925b9e457bd5b9bcc8ced003e856f Mon Sep 17 00:00:00 2001 From: Humaira Ambreen <181621420+humairaambreen@users.noreply.github.com> Date: Sun, 27 Sep 2026 12:17:06 +0530 Subject: [PATCH 1/2] fix(responses): add reasoning summary Fixes #41262 --- .../transformation.py | 1 + .../test_litellm_completion_responses.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/litellm/responses/litellm_completion_transformation/transformation.py b/litellm/responses/litellm_completion_transformation/transformation.py index bd239922fd3..03089eb7ba7 100644 --- a/litellm/responses/litellm_completion_transformation/transformation.py +++ b/litellm/responses/litellm_completion_transformation/transformation.py @@ -2605,6 +2605,7 @@ class LiteLLMCompletionResponsesConfig: for text in (reasoning_content,) if text ], + summary=[], encrypted_content=encrypted_content, ) ] diff --git a/tests/unit/responses/litellm_completion_transformation/test_litellm_completion_responses.py b/tests/unit/responses/litellm_completion_transformation/test_litellm_completion_responses.py index 7b9de4644b4..acf638e2873 100644 --- a/tests/unit/responses/litellm_completion_transformation/test_litellm_completion_responses.py +++ b/tests/unit/responses/litellm_completion_transformation/test_litellm_completion_responses.py @@ -4939,6 +4939,24 @@ class TestBridgedOutputItemIdPrefixes: choices=[choice], ) + def test_reasoning_item_includes_empty_summary(self): + item: Final = self._reasoning_items()[0] + + assert item.model_dump(exclude_none=True) == { + "type": "reasoning", + "id": item.id, + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "thinking about fruit", + "annotations": [], + } + ], + "summary": [], + } + def test_reasoning_item_id_uses_rs_prefix(self): items = self._reasoning_items() From c504ed59c23e183f6e06febc526c1f3aeb123763 Mon Sep 17 00:00:00 2001 From: Humaira Ambreen <181621420+humairaambreen@users.noreply.github.com> Date: Sun, 27 Sep 2026 12:51:14 +0530 Subject: [PATCH 2/2] fix(responses): add summary via model copy Keep reasoning summary on the wire without widening the generic response schema. --- .../litellm_completion_transformation/transformation.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/litellm/responses/litellm_completion_transformation/transformation.py b/litellm/responses/litellm_completion_transformation/transformation.py index 03089eb7ba7..593d9803c1b 100644 --- a/litellm/responses/litellm_completion_transformation/transformation.py +++ b/litellm/responses/litellm_completion_transformation/transformation.py @@ -2605,9 +2605,8 @@ class LiteLLMCompletionResponsesConfig: for text in (reasoning_content,) if text ], - summary=[], encrypted_content=encrypted_content, - ) + ).model_copy(update={"summary": []}) ] return []