From aa6fd8971d79e71f750ac63b671bb6f99c46b4ef Mon Sep 17 00:00:00 2001 From: Vedant-2-6 Date: Mon, 31 Aug 2026 18:43:24 +0530 Subject: [PATCH] fix: add reasoning_items to unsupported_delta_fields in streaming serializer The fast-serialization path dropped delta.reasoning_items by classifying chunks with empty content and reasoning_items as simple text. Adding the field to unsupported_delta_fields causes such chunks to fall through to model_dump_json, preserving the encrypted reasoning state for multi-turn tool loops. Fixes #38907 --- litellm/proxy/proxy_server.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 887716a383a..657e11ad31b 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -8268,6 +8268,7 @@ def _fast_serialize_simple_model_response_stream( "thinking_blocks", "provider_specific_fields", "refusal", + "reasoning_items", ) if any(getattr(delta, field, None) is not None for field in unsupported_delta_fields): return None