The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
is_error_str_rate_limit
Ishaan Jaffe66898828cf4
diff --git a/litellm/litellm_core_utils/exception_mapping_utils.py b/litellm/litellm_core_utils/exception_mapping_utils.pyindex 5d1d5c71276..7905cd571b9 100644--- a/litellm/litellm_core_utils/exception_mapping_utils.py+++ b/litellm/litellm_core_utils/exception_mapping_utils.py@@ -42,8 +42,17 @@ class ExceptionCheckers:"""if not isinstance(error_str, str):return False-- return "429" in error_str or "rate limit" in error_str.lower()++ if "429" in error_str or "rate limit" in error_str.lower():+ return True++ #######################################+ # Mistral API returns this error string+ #########################################+ if "service tier capacity exceeded" in error_str.lower():+ return True++ return False@staticmethoddef is_error_str_context_window_exceeded(error_str: str) -> bool: