Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions litellm/litellm_core_utils/exception_mapping_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def is_error_str_context_window_exceeded(error_str: str) -> bool:
"model's maximum context limit",
"is longer than the model's context length",
"input tokens exceed the configured limit",
"`inputs` tokens + `max_new_tokens` must be",
]
for substring in known_exception_substrings:
if substring in _error_str_lowercase:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
"Input tokens exceed the configured limit of 272000 tokens. Your messages resulted in 509178 tokens. Please reduce the length of the messages.",
True,
),
(
"`inputs` tokens + `max_new_tokens` must be <= 4096",
True,
),
# Test case insensitivity
("ERROR: THIS MODEL'S MAXIMUM CONTEXT LENGTH IS 1024.", True),
# Negative cases (should return False)
Expand Down
Loading