fix(utils.py): add together ai exception mapping

This commit is contained in:
Krrish Dholakia 2024-06-20 11:29:39 -07:00
parent 3d90b25005
commit d6eb986b8e
2 changed files with 18 additions and 1 deletions

View file

@ -5741,7 +5741,15 @@ def exception_type(
response=original_exception.response,
litellm_debug_info=extra_information,
)
elif "Web server is returning an unknown error" in error_str:
exception_mapping_worked = True
raise litellm.InternalServerError(
message=f"{exception_provider} - {message}",
model=model,
llm_provider=custom_llm_provider,
)
elif "Request too large" in error_str:
exception_mapping_worked = True
raise RateLimitError(
message=f"RateLimitError: {exception_provider} - {message}",
model=model,