diff --git a/pr_agent/algo/ai_handlers/litellm_ai_handler.py b/pr_agent/algo/ai_handlers/litellm_ai_handler.py index 88041658..8d727b8b 100644 --- a/pr_agent/algo/ai_handlers/litellm_ai_handler.py +++ b/pr_agent/algo/ai_handlers/litellm_ai_handler.py @@ -371,12 +371,12 @@ class LiteLLMAIHandler(BaseAiHandler): get_logger().info(f"\nUser prompt:\n{user}") response = await acompletion(**kwargs) - except (openai.APIError, openai.APITimeoutError) as e: - get_logger().warning(f"Error during LLM inference: {e}") - raise except (openai.RateLimitError) as e: get_logger().error(f"Rate limit error during LLM inference: {e}") raise + except (openai.APIError, openai.APITimeoutError) as e: + get_logger().warning(f"Error during LLM inference: {e}") + raise except (Exception) as e: get_logger().warning(f"Unknown error during LLM inference: {e}") raise openai.APIError from e