diff --git a/litellm/proxy/pass_through_endpoints/streaming_handler.py b/litellm/proxy/pass_through_endpoints/streaming_handler.py index 4420bd1d70a..b7faa21e46a 100644 --- a/litellm/proxy/pass_through_endpoints/streaming_handler.py +++ b/litellm/proxy/pass_through_endpoints/streaming_handler.py @@ -98,6 +98,8 @@ async def chunk_processor( complete_streaming_response: Optional[ Union[litellm.ModelResponse, litellm.TextCompletionResponse] ] = litellm.stream_chunk_builder(chunks=all_chunks) + if complete_streaming_response is None: + complete_streaming_response = litellm.ModelResponse() end_time = datetime.now() if passthrough_success_handler_obj.is_vertex_route(url_route):