diff --git a/litellm/proxy/pass_through_endpoints/streaming_handler.py b/litellm/proxy/pass_through_endpoints/streaming_handler.py index 67c5d7201..9ba5adfec 100644 --- a/litellm/proxy/pass_through_endpoints/streaming_handler.py +++ b/litellm/proxy/pass_through_endpoints/streaming_handler.py @@ -48,7 +48,8 @@ async def chunk_processor( continue # Handle SSE format - pass through the raw SSE format - chunk = chunk.decode("utf-8") if isinstance(chunk, bytes) else chunk + if isinstance(chunk, bytes): + chunk = chunk.decode("utf-8") # Store the chunk for post-processing if chunk.strip(): # Only store non-empty chunks