fix: Restore import of LiteLLMExceptions in base_coder.py

This commit is contained in:
Paul Gauthier 2024-11-07 13:02:17 -08:00 committed by Paul Gauthier (aider)
parent 9e7219c4d6
commit 4941a360cb
2 changed files with 17 additions and 5 deletions

View file

@ -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

View file

@ -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(
"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),