mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
revert(auth): remove max_ui_session_budget from CLI session token
max_ui_session_budget defaults to $0.25 and is sized for the UI chat pane (10-min sessions). CLI sessions are 24-hour tokens for real work; capping them at that ceiling would throttle users under their actual user/team budget. Budget enforcement for CLI sessions is via the shared user and team counters as originally intended.
This commit is contained in:
parent
92ed63092c
commit
3e729eade3
2 changed files with 0 additions and 13 deletions
|
|
@ -2462,7 +2462,6 @@ class ExperimentalUIJWTToken:
|
|||
key_name=session_alias,
|
||||
key_alias=session_alias,
|
||||
expires=expires,
|
||||
max_budget=litellm.max_ui_session_budget,
|
||||
user_id=user_info.user_id,
|
||||
team_id=_team_id,
|
||||
team_alias=team_alias,
|
||||
|
|
|
|||
|
|
@ -538,18 +538,6 @@ def test_get_cli_jwt_auth_token_unique_per_session(valid_sso_user_defined_values
|
|||
assert first["key_name"] == second["key_name"] == expected_alias
|
||||
|
||||
|
||||
def test_get_cli_jwt_auth_token_enforces_max_ui_session_budget(
|
||||
valid_sso_user_defined_values,
|
||||
):
|
||||
token = ExperimentalUIJWTToken.get_cli_jwt_auth_token(valid_sso_user_defined_values)
|
||||
|
||||
decrypted = decrypt_value_helper(token, key="ui_hash_key", exception_type="debug")
|
||||
assert decrypted is not None
|
||||
token_data = json.loads(decrypted)
|
||||
|
||||
assert token_data.get("max_budget") == litellm.max_ui_session_budget
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_default_internal_user_params_with_get_user_object(monkeypatch):
|
||||
"""Test that default_internal_user_params is used when creating a new user via get_user_object"""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue