This commit is contained in:
Paul Gauthier 2025-04-04 07:49:36 +13:00
parent 4529d73bf3
commit 01ca552174

View file

@ -85,6 +85,11 @@ class LiteLLMExceptions:
return ExInfo("APIConnectionError", False, "You need to: pip install boto3")
if "OpenrouterException" in str(ex) and "'choices'" in str(ex):
return ExInfo(
"APIConnectionError", True, "The OpenRouter API provider is down or overloaded."
"APIConnectionError",
True,
(
"OpenRouter or the upstream API provider is down, overloaded or rate"
" limiting your requests."
),
)
return self.exceptions.get(ex.__class__, ExInfo(None, None, None))