diff --git a/litellm/litellm_core_utils/streaming_handler.py b/litellm/litellm_core_utils/streaming_handler.py index 1ae79f74087..ca5f6a2f6db 100644 --- a/litellm/litellm_core_utils/streaming_handler.py +++ b/litellm/litellm_core_utils/streaming_handler.py @@ -839,6 +839,10 @@ class CustomStreamWrapper: not self.sent_first_chunk and hasattr(model_response.choices[0].delta, "role") and model_response.choices[0].delta.role is not None + and not ( + model_response.choices[0].logprobs is not None + and not model_response.choices[0].logprobs.content + ) ) ): return True