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 3148d55284
commit 01b7dfa63b

View file

@ -8147,7 +8147,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(