Update litellm/proxy/management_endpoints/key_management_endpoints.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
jesus-berri 2026-09-18 14:31:34 -07:00 • committed by GitHub
parent 48bde68781
commit ee7d2b5094
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1233,8 +1233,7 @@ async def _common_key_generation_helper(
# Delegated-authority ceiling (GHSA-q775-qw9r-2r4g): a non-admin caller
# cannot grant a key a higher budget than their own authority.
# Session tokens (lite login) use their session max_budget for team keys, but
# personal keys are capped by user_max_budget when it is available.
# UI session personal keys are capped by user_max_budget when it is available.
is_ui_session_token: Final = user_api_key_dict.team_id == UI_SESSION_TOKEN_TEAM_ID
is_ui_session_team_key = is_ui_session_token and _requested_team_id is not None
if (