diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index 2029a2193..5867f54e6 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -19,10 +19,10 @@ from json.decoder import JSONDecodeError from pathlib import Path from typing import List -from aider.exceptions import LiteLLMExceptions from aider import __version__, models, prompts, urls, utils from aider.analytics import Analytics from aider.commands import Commands +from aider.exceptions import LiteLLMExceptions from aider.history import ChatSummary from aider.io import ConfirmGroup, InputOutput from aider.linter import Linter diff --git a/aider/exceptions.py b/aider/exceptions.py index 52558b576..fb473712a 100644 --- a/aider/exceptions.py +++ b/aider/exceptions.py @@ -12,18 +12,30 @@ EXCEPTIONS = [ ExInfo("APIConnectionError", True, None), ExInfo("APIError", True, None), ExInfo("APIResponseValidationError", True, None), - ExInfo("AuthenticationError", False, "The API provider is not able to authenticate you. Check your API key."), + ExInfo( + "AuthenticationError", + False, + "The API provider is not able to authenticate you. Check your API key.", + ), ExInfo("AzureOpenAIError", True, None), ExInfo("BadRequestError", False, None), ExInfo("BudgetExceededError", True, None), - ExInfo("ContentPolicyViolationError", True, "The API provider has refused the request due to a safety policy about the content."), - ExInfo("ContextWindowExceededError", False, None), # special case handled in base_coder + ExInfo( + "ContentPolicyViolationError", + True, + "The API provider has refused the request due to a safety policy about the content.", + ), + ExInfo("ContextWindowExceededError", False, None), # special case handled in base_coder ExInfo("InternalServerError", True, "The API provider's servers are down or overloaded."), ExInfo("InvalidRequestError", True, None), ExInfo("JSONSchemaValidationError", True, None), ExInfo("NotFoundError", False, None), ExInfo("OpenAIError", True, None), - ExInfo("RateLimitError", True, "The API provider has rate limited you. Try again later or check your quotas."), + ExInfo( + "RateLimitError", + True, + "The API provider has rate limited you. Try again later or check your quotas.", + ), ExInfo("RouterRateLimitError", True, None), ExInfo("ServiceUnavailableError", True, "The API provider's servers are down or overloaded."), ExInfo("UnprocessableEntityError", True, None),