mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 23:05:00 +00:00
fix: update litellm exception imports and error handling
This commit is contained in:
parent
513f06be46
commit
8e2a4b47d6
1 changed files with 13 additions and 13 deletions
|
@ -25,18 +25,18 @@ def retry_exceptions():
|
|||
httpx.RemoteProtocolError,
|
||||
httpx.ReadTimeout,
|
||||
# litellm
|
||||
litellm.AuthenticationError,
|
||||
litellm.PermissionDeniedError,
|
||||
litellm.NotFoundError,
|
||||
litellm.UnprocessableEntityError,
|
||||
litellm.RateLimitError,
|
||||
litellm.InternalServerError,
|
||||
litellm.ContextWindowExceededError,
|
||||
litellm.ContentPolicyViolationError,
|
||||
litellm.APIConnectionError,
|
||||
litellm.APIError,
|
||||
litellm.ServiceUnavailableError,
|
||||
litellm.Timeout,
|
||||
litellm.exceptions.AuthenticationError,
|
||||
litellm.exceptions.PermissionDeniedError,
|
||||
litellm.exceptions.NotFoundError,
|
||||
litellm.exceptions.UnprocessableEntityError,
|
||||
litellm.exceptions.RateLimitError,
|
||||
litellm.exceptions.InternalServerError,
|
||||
litellm.exceptions.ContextWindowExceededError,
|
||||
litellm.exceptions.ContentPolicyViolationError,
|
||||
litellm.exceptions.APIConnectionError,
|
||||
litellm.exceptions.APIError,
|
||||
litellm.exceptions.ServiceUnavailableError,
|
||||
litellm.exceptions.Timeout,
|
||||
)
|
||||
|
||||
|
||||
|
@ -110,5 +110,5 @@ def simple_send_with_retries(model_name, messages, extra_params=None):
|
|||
|
||||
_hash, response = send_completion(**kwargs)
|
||||
return response.choices[0].message.content
|
||||
except (AttributeError, litellm.BadRequestError):
|
||||
except AttributeError:
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue