From e2dff0a74b498ec73daeb80124ad08a1f12e1451 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 25 Oct 2024 15:47:30 -0700 Subject: [PATCH] #2120 --- aider/sendchat.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/aider/sendchat.py b/aider/sendchat.py index daa0f22a12c..8420c929ed5 100644 --- a/aider/sendchat.py +++ b/aider/sendchat.py @@ -20,19 +20,24 @@ def retry_exceptions(): import httpx return ( + # httpx httpx.ConnectError, httpx.RemoteProtocolError, httpx.ReadTimeout, + # litellm + litellm.exceptions.BadRequestError, + 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.RateLimitError, litellm.exceptions.ServiceUnavailableError, litellm.exceptions.Timeout, - litellm.exceptions.InternalServerError, - # These are apparently different? - # https://github.com/search?q=repo%3ABerriAI%2Flitellm%20AnthropicError&type=code - litellm.llms.anthropic.common_utils.AnthropicError, - litellm.llms.anthropic.completion.AnthropicError, )