From 01dd5182016c57870c9b494afb4f62bb32b194dc Mon Sep 17 00:00:00 2001 From: dhs-shine Date: Wed, 11 Jun 2025 05:06:57 +0900 Subject: [PATCH] (fix:exception_mapping_utils.py) fix sglang rate limit error issue (#11575) --- litellm/litellm_core_utils/exception_mapping_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/litellm_core_utils/exception_mapping_utils.py b/litellm/litellm_core_utils/exception_mapping_utils.py index e898ebbcb06..f38883bb179 100644 --- a/litellm/litellm_core_utils/exception_mapping_utils.py +++ b/litellm/litellm_core_utils/exception_mapping_utils.py @@ -309,6 +309,7 @@ def exception_type( # type: ignore # noqa: PLR0915 or "string too long. Expected a string with maximum length" in error_str or "model's maximum context limit" in error_str + or "is longer than the model's context length" in error_str ): exception_mapping_worked = True raise ContextWindowExceededError(