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
fix: fix test to specify allowed_fails
Krrish Dholakiace39649b2af1
diff --git a/litellm/router.py b/litellm/router.pyindex e31de5332eb..aa9768ba440 100644--- a/litellm/router.py+++ b/litellm/router.py@@ -321,7 +321,10 @@ class Router:[]) # initialize an empty list - to allow _add_deployment and delete_deployment to work- self.allowed_fails = allowed_fails or litellm.allowed_fails+ if allowed_fails is not None:+ self.allowed_fails = allowed_fails+ else:+ self.allowed_fails = litellm.allowed_failsself.cooldown_time = cooldown_time or 60self.disable_cooldowns = disable_cooldownsself.failed_calls = (diff --git a/litellm/tests/test_acooldowns_router.py b/litellm/tests/test_acooldowns_router.pyindex 7dced31a8f3..f07bb2c6676 100644--- a/litellm/tests/test_acooldowns_router.py+++ b/litellm/tests/test_acooldowns_router.py@@ -1,18 +1,24 @@#### What this tests ##### This tests calling batch_completions by running 100 messages together-import sys, os, time-import traceback, asyncio+import asyncio+import os+import sys+import time+import traceback+import pytestsys.path.insert(0, os.path.abspath("../..")) # Adds the parent directory to the system path-import litellm-from litellm import Routerimport concurrent+from dotenv import load_dotenv+import litellm+from litellm import Router+load_dotenv()model_list = [@@ -45,7 +51,8 @@ kwargs = {def test_multiple_deployments_sync():- import concurrent, time+ import concurrent+ import timelitellm.set_verbose = Falseresults = []@@ -161,6 +168,7 @@ async def test_cooldown_same_model_name(sync_mode):routing_strategy="simple-shuffle",set_verbose=True,num_retries=3,+ allowed_fails=0,) # type: ignoreif sync_mode: