From 93b79a32596b6cd2263112893b2a7a8c156b223e Mon Sep 17 00:00:00 2001 From: Sameer Kankute Date: Mon, 29 Jun 2026 11:38:50 +0530 Subject: [PATCH] fix(ui_sso): cap JWT budget for teamless users with no personal budget _resolve_cli_session_budget was returning None for users with no team_id and no personal budget, issuing uncapped JWT sessions. Cap these with litellm.max_ui_session_budget to match the behaviour of the team path. Co-Authored-By: Claude Sonnet 4.6 --- litellm/proxy/management_endpoints/ui_sso.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/management_endpoints/ui_sso.py b/litellm/proxy/management_endpoints/ui_sso.py index e9fa9d45581..895f3a8b00e 100644 --- a/litellm/proxy/management_endpoints/ui_sso.py +++ b/litellm/proxy/management_endpoints/ui_sso.py @@ -2083,7 +2083,8 @@ async def _resolve_cli_session_budget( except Exception: return None # team lookup failed: don't apply fallback cap - return None + # No team and no personal budget — cap the session + return litellm.max_ui_session_budget @router.get("/sso/cli/poll/{key_id}", tags=["experimental"], include_in_schema=False)