mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
(feat) mistral - add exception mapping
This commit is contained in:
parent
a033016a63
commit
c0cc78b943
3 changed files with 37 additions and 3 deletions
|
@ -4163,7 +4163,7 @@ def exception_type(
|
|||
llm_provider=custom_llm_provider
|
||||
)
|
||||
|
||||
if custom_llm_provider == "openai" or custom_llm_provider == "text-completion-openai" or custom_llm_provider == "custom_openai":
|
||||
if custom_llm_provider == "openai" or custom_llm_provider == "text-completion-openai" or custom_llm_provider == "custom_openai" or custom_llm_provider in litellm.openai_compatible_providers:
|
||||
if "This model's maximum context length is" in error_str or "Request too large" in error_str:
|
||||
exception_mapping_worked = True
|
||||
raise ContextWindowExceededError(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue