From b4fbb635775147d3784df9b553e1ff73fe6abd06 Mon Sep 17 00:00:00 2001 From: Tanmay Mandal Date: Mon, 11 May 2026 18:03:21 +0530 Subject: [PATCH] fix(streaming): add type ignore for finish_reason assignment in CustomStreamWrapper --- litellm/litellm_core_utils/streaming_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/litellm_core_utils/streaming_handler.py b/litellm/litellm_core_utils/streaming_handler.py index 137e3057fec..d90195a7af4 100644 --- a/litellm/litellm_core_utils/streaming_handler.py +++ b/litellm/litellm_core_utils/streaming_handler.py @@ -1151,7 +1151,7 @@ class CustomStreamWrapper: # Strip finish_reason from the content chunk so it appears # only on the trailing empty-delta chunk (OpenAI spec). # finish_reason_handler() will emit the proper terminal chunk. - chunk.choices[0].finish_reason = None + chunk.choices[0].finish_reason = None # type: ignore[assignment] return chunk if (