Skip to content

Commit

Permalink
Add litellm exceptions to the list of non-retryable errors
Browse files Browse the repository at this point in the history
  • Loading branch information
HamadaSalhab committed Oct 9, 2024
1 parent 7cfa193 commit 018360c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions agents-api/agents_api/common/exceptions/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import httpx
import jinja2
import jsonschema.exceptions
import litellm
import pydantic
import requests
import temporalio.exceptions
Expand Down Expand Up @@ -70,10 +71,12 @@
pydantic.ValidationError,
requests.exceptions.InvalidURL,
requests.exceptions.MissingSchema,
#
# Box exceptions
box.exceptions.BoxKeyError,
box.exceptions.BoxTypeError,
box.exceptions.BoxValueError,
#
# Beartype exceptions
beartype.roar.BeartypeException,
beartype.roar.BeartypeDecorException,
Expand All @@ -88,6 +91,14 @@
beartype.roar.BeartypeCallHintReturnViolation,
beartype.roar.BeartypeDecorHintParamDefaultViolation,
beartype.roar.BeartypeDoorHintViolation,
#
# LiteLLM exceptions
litellm.exceptions.NotFoundError,
litellm.exceptions.InvalidRequestError,
litellm.exceptions.AuthenticationError,
litellm.exceptions.ServiceUnavailableError,
litellm.exceptions.OpenAIError,
litellm.exceptions.APIError,
]


Expand Down

0 comments on commit 018360c

Please sign in to comment.