forked from phoenix/litellm-mirror
fix(utils.py): watsonx ai exception mapping fix
This commit is contained in:
parent
af9489bbfd
commit
d7c28509d7
1 changed files with 9 additions and 0 deletions
|
@ -8513,6 +8513,15 @@ def exception_type(
|
||||||
model=model,
|
model=model,
|
||||||
request=original_exception.request,
|
request=original_exception.request,
|
||||||
)
|
)
|
||||||
|
elif custom_llm_provider == "watsonx":
|
||||||
|
if "token_quota_reached" in error_response:
|
||||||
|
exception_mapping_worked = True
|
||||||
|
raise RateLimitError(
|
||||||
|
message=f"WatsonxException: Rate Limit Errror - {error_str}",
|
||||||
|
llm_provider="watsonx",
|
||||||
|
model=model,
|
||||||
|
response=original_exception.response,
|
||||||
|
)
|
||||||
elif custom_llm_provider == "bedrock":
|
elif custom_llm_provider == "bedrock":
|
||||||
if (
|
if (
|
||||||
"too many tokens" in error_str
|
"too many tokens" in error_str
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue