mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-15 18:20:37 +08:00
feat: add validation for empty streaming responses in LiteLLM handler
This commit is contained in:
@ -436,4 +436,8 @@ class LiteLLMAIHandler(BaseAiHandler):
|
||||
get_logger().error(f"Error handling streaming response: {e}")
|
||||
raise
|
||||
|
||||
if not full_response:
|
||||
get_logger().warning("Streaming response resulted in empty content")
|
||||
raise openai.APIError("Empty streaming response received")
|
||||
|
||||
return full_response, finish_reason
|
||||
|
Reference in New Issue
Block a user