diff --git a/litellm/proxy/auth/auth_checks.py b/litellm/proxy/auth/auth_checks.py index 5df33dc4916..e12f9d70ebc 100644 --- a/litellm/proxy/auth/auth_checks.py +++ b/litellm/proxy/auth/auth_checks.py @@ -5412,9 +5412,7 @@ async def can_key_call_model( ) if models_from_groups is not None: allowed_models: Final = ( - list(dict.fromkeys([*key_models, *models_from_groups])) - if key_models - else models_from_groups + list(dict.fromkeys([*key_models, *models_from_groups])) if key_models else models_from_groups ) if not allowed_models: raise ModelAccessDeniedProxyException( @@ -5645,9 +5643,7 @@ async def can_team_access_model( ) if models_from_groups is not None: allowed_models: Final = ( - list(dict.fromkeys([*team_models, *models_from_groups])) - if team_models - else models_from_groups + list(dict.fromkeys([*team_models, *models_from_groups])) if team_models else models_from_groups ) if not allowed_models: raise ModelAccessDeniedProxyException(