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

Guard should_include_deployment fallback to only return deployments
matching the requested team_id, preventing public-name collisions
from leaking deployments across teams

Made-with: Cursor
This commit is contained in:
Sameer Kankute 2026-03-23 17:00:30 +05:30
parent ef9ea1f8f2
commit 4f302f10d0
No known key found for this signature in database

View file

@ -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(