From e45cdb83f04d2db817ec961f34b50c648ea94441 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 11 Sep 2026 01:28:11 +0000 Subject: [PATCH] chore(proxy): suppress gate findings on team admin check Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../proxy/management_endpoints/key_management_endpoints.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/management_endpoints/key_management_endpoints.py b/litellm/proxy/management_endpoints/key_management_endpoints.py index d621b9f4bc7..758426ecc99 100644 --- a/litellm/proxy/management_endpoints/key_management_endpoints.py +++ b/litellm/proxy/management_endpoints/key_management_endpoints.py @@ -2708,13 +2708,13 @@ async def _validate_update_key_caller_access( user_api_key_cache=user_api_key_cache, check_db_only=True, ) - if team_obj is None or not ( + if team_obj is None or not ( # pyright: ignore[reportUnnecessaryComparison] # get_team_object returns None when the team row is missing despite the non-Optional annotation _is_user_team_admin(user_api_key_dict=user_api_key_dict, team_obj=team_obj) or await _is_user_org_admin_for_team(user_api_key_dict=user_api_key_dict, team_obj=team_obj) ): raise HTTPException( status_code=403, - detail={ + detail={ # mutable-ok: FastAPI detail contract "error": f"Only proxy admins, team admins, or org admins can call /key/update. " f"user_role={user_api_key_dict.user_role}, user_id={user_api_key_dict.user_id}" },