mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 19:05:18 +00:00
feat: add validation for empty streaming responses in LiteLLM handler
This commit is contained in:
parent
5e82d0a316
commit
2d8bee0d6d
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue