Skip to content

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]

Properly use `allowed_fails_policy` when it has fields with a value of 0 (#5604)

Elad Segalda30da9a971c
diff --git a/litellm/router.py b/litellm/router.py
index bcd0b6221de..e1cb108ccf6 100644
--- a/litellm/router.py
+++ b/litellm/router.py
@@ -3690,7 +3690,7 @@ class Router:
exception=original_exception,
)
- allowed_fails = _allowed_fails or self.allowed_fails
+ allowed_fails = _allowed_fails if _allowed_fails is not None else self.allowed_fails
dt = get_utc_datetime()
current_minute = dt.strftime("%H-%M")