mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
feat: add OpenRouter API error detection
This commit is contained in:
parent
8737220fb6
commit
6e1dd4474b
1 changed files with 4 additions and 0 deletions
|
@ -83,4 +83,8 @@ class LiteLLMExceptions:
|
|||
)
|
||||
if "boto3" in str(ex):
|
||||
return ExInfo("APIConnectionError", False, "You need to: pip install boto3")
|
||||
if "OpenrouterException" in str(ex) and "'choices'" in str(ex):
|
||||
return ExInfo(
|
||||
"APIConnectionError", False, "The OpenRouter API provider is down or offline"
|
||||
)
|
||||
return self.exceptions.get(ex.__class__, ExInfo(None, None, None))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue