mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
Add context window exception mapping for Together AI (#17284)
This commit is contained in:
parent
da5b81c1ff
commit
89458573a2
2 changed files with 5 additions and 0 deletions
|
|
@ -77,6 +77,7 @@ class ExceptionCheckers:
|
|||
"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:
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@ context_window_test_cases = [
|
|||
"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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue