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 <noreply@anthropic.com>
This commit is contained in:
Sameer Kankute 2026-06-29 11:38:50 +05:30
parent 8dd7e165e3
commit 93b79a3259
No known key found for this signature in database

View file

@ -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)