forked from phoenix/litellm-mirror
fix(utils.py): add new error string to context window exception mapping
This commit is contained in:
parent
d6eb986b8e
commit
5cb0c1ad70
1 changed files with 5 additions and 1 deletions
|
@ -5688,7 +5688,11 @@ def exception_type(
|
||||||
+ "Exception"
|
+ "Exception"
|
||||||
)
|
)
|
||||||
|
|
||||||
if "This model's maximum context length is" in error_str:
|
if (
|
||||||
|
"This model's maximum context length is" in error_str
|
||||||
|
or "string too long. Expected a string with maximum length"
|
||||||
|
in error_str
|
||||||
|
):
|
||||||
exception_mapping_worked = True
|
exception_mapping_worked = True
|
||||||
raise ContextWindowExceededError(
|
raise ContextWindowExceededError(
|
||||||
message=f"ContextWindowExceededError: {exception_provider} - {message}",
|
message=f"ContextWindowExceededError: {exception_provider} - {message}",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue