mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
fix(utils.py): add together ai exception mapping
This commit is contained in:
parent
1a4467c1a5
commit
bc01a66e44
2 changed files with 18 additions and 1 deletions
|
@ -865,7 +865,7 @@
|
||||||
},
|
},
|
||||||
"deepseek-coder": {
|
"deepseek-coder": {
|
||||||
"max_tokens": 4096,
|
"max_tokens": 4096,
|
||||||
"max_input_tokens": 16000,
|
"max_input_tokens": 32000,
|
||||||
"max_output_tokens": 4096,
|
"max_output_tokens": 4096,
|
||||||
"input_cost_per_token": 0.00000014,
|
"input_cost_per_token": 0.00000014,
|
||||||
"output_cost_per_token": 0.00000028,
|
"output_cost_per_token": 0.00000028,
|
||||||
|
@ -1984,6 +1984,15 @@
|
||||||
"litellm_provider": "replicate",
|
"litellm_provider": "replicate",
|
||||||
"mode": "chat"
|
"mode": "chat"
|
||||||
},
|
},
|
||||||
|
"openrouter/deepseek/deepseek-coder": {
|
||||||
|
"max_tokens": 4096,
|
||||||
|
"max_input_tokens": 32000,
|
||||||
|
"max_output_tokens": 4096,
|
||||||
|
"input_cost_per_token": 0.00000014,
|
||||||
|
"output_cost_per_token": 0.00000028,
|
||||||
|
"litellm_provider": "openrouter",
|
||||||
|
"mode": "chat"
|
||||||
|
},
|
||||||
"openrouter/microsoft/wizardlm-2-8x22b:nitro": {
|
"openrouter/microsoft/wizardlm-2-8x22b:nitro": {
|
||||||
"max_tokens": 65536,
|
"max_tokens": 65536,
|
||||||
"input_cost_per_token": 0.000001,
|
"input_cost_per_token": 0.000001,
|
||||||
|
|
|
@ -5741,7 +5741,15 @@ def exception_type(
|
||||||
response=original_exception.response,
|
response=original_exception.response,
|
||||||
litellm_debug_info=extra_information,
|
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:
|
elif "Request too large" in error_str:
|
||||||
|
exception_mapping_worked = True
|
||||||
raise RateLimitError(
|
raise RateLimitError(
|
||||||
message=f"RateLimitError: {exception_provider} - {message}",
|
message=f"RateLimitError: {exception_provider} - {message}",
|
||||||
model=model,
|
model=model,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue