mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
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:
parent
8dd7e165e3
commit
93b79a3259
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue