diff --git a/litellm/proxy/pass_through_endpoints/streaming_handler.py b/litellm/proxy/pass_through_endpoints/streaming_handler.py index ab1d5d813ff..4420bd1d70a 100644 --- a/litellm/proxy/pass_through_endpoints/streaming_handler.py +++ b/litellm/proxy/pass_through_endpoints/streaming_handler.py @@ -95,9 +95,9 @@ async def chunk_processor( except json.JSONDecodeError: pass - complete_streaming_response: litellm.ModelResponse = ( - litellm.stream_chunk_builder(chunks=all_chunks) - ) + complete_streaming_response: Optional[ + Union[litellm.ModelResponse, litellm.TextCompletionResponse] + ] = litellm.stream_chunk_builder(chunks=all_chunks) end_time = datetime.now() if passthrough_success_handler_obj.is_vertex_route(url_route):