From bfe5d65851830467eb3e10bdb8ed9b5259b42923 Mon Sep 17 00:00:00 2001 From: Loveacup <119270534+Loveacup@users.noreply.github.com> Date: Sun, 25 Oct 2026 13:25:18 +0800 Subject: [PATCH] fix(chatgpt): allow per-iteration normalized index binding --- litellm/llms/chatgpt/chat/streaming_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/llms/chatgpt/chat/streaming_utils.py b/litellm/llms/chatgpt/chat/streaming_utils.py index b46ca4af6a5..aefdb53a0e0 100644 --- a/litellm/llms/chatgpt/chat/streaming_utils.py +++ b/litellm/llms/chatgpt/chat/streaming_utils.py @@ -104,7 +104,7 @@ class ChatGPTToolCallNormalizer: continue else: # Continuation delta (id=None) — use its source index when unambiguous - normalized_index: Final = self._source_index_to_output_index.get(tc.index) + normalized_index = self._source_index_to_output_index.get(tc.index) if normalized_index is not None: tc.index = normalized_index elif self._last_id: