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 (