From fdad43b6dd68411aaeb05b41af003136846fe7be Mon Sep 17 00:00:00 2001 From: Ryan Crabbe Date: Sat, 28 Mar 2026 17:45:37 -0700 Subject: [PATCH] style: use `not team_object.models` consistently for empty-list checks --- litellm/proxy/proxy_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 222bdb42f8d..6eab3f70ca0 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -9275,7 +9275,7 @@ async def _add_access_group_models_to_team_models( # Skip teams with empty models list — they already have access to everything # (handled by _add_team_models_to_all_models) if ( - len(team_object.models) == 0 + not team_object.models or SpecialModelNames.all_proxy_models.value in team_object.models ): continue @@ -9869,7 +9869,7 @@ async def _filter_models_by_team_id( team_accessible_model_ids: Set[str] = set() if ( - len(team_object.models) == 0 # empty list = all model access + not team_object.models # empty list = all model access or SpecialModelNames.all_proxy_models.value in team_object.models ): # Team has access to all models