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]

fix(router): prevent cross-team deployment leakage in fallback path

Sameer Kankute4f302f10d052
diff --git a/litellm/router.py b/litellm/router.py
index c9d79beacce..7f428b18edf 100644
--- a/litellm/router.py
+++ b/litellm/router.py
@@ -8225,7 +8225,8 @@ class Router:
):
return True
elif model_name is not None and model["model_name"] == model_name:
- return True
+ if team_id is None or model["model_info"].get("team_id") == team_id:
+ return True
return False
def _get_all_deployments(