diff --git a/litellm/responses/litellm_completion_transformation/transformation.py b/litellm/responses/litellm_completion_transformation/transformation.py index bd239922fd3..593d9803c1b 100644 --- a/litellm/responses/litellm_completion_transformation/transformation.py +++ b/litellm/responses/litellm_completion_transformation/transformation.py @@ -2606,7 +2606,7 @@ class LiteLLMCompletionResponsesConfig: if text ], encrypted_content=encrypted_content, - ) + ).model_copy(update={"summary": []}) ] return [] 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()