mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-15 10:10:38 +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}")
|
get_logger().error(f"Error handling streaming response: {e}")
|
||||||
raise
|
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
|
return full_response, finish_reason
|
||||||
|
Reference in New Issue
Block a user