forked from phoenix/litellm-mirror
feat(router.py): add server cooldown logic
This commit is contained in:
parent
4ece219ec5
commit
3e76d4b422
5 changed files with 67 additions and 82 deletions
|
@ -3579,7 +3579,7 @@ def exception_type(
|
|||
)
|
||||
elif custom_llm_provider == "anthropic": # one of the anthropics
|
||||
if hasattr(original_exception, "message"):
|
||||
if "prompt is too long" in original_exception.message:
|
||||
if "prompt is too long" in original_exception.message or "prompt: length" in original_exception.message:
|
||||
exception_mapping_worked = True
|
||||
raise ContextWindowExceededError(
|
||||
message=original_exception.message,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue