From cde51a53a764a552eb49bfa0df9b4b349ee9cdfc Mon Sep 17 00:00:00 2001 From: Julio Quinteros Pro Date: Fri, 20 Feb 2026 00:31:56 -0300 Subject: [PATCH] fix(tests): set premium_user=True in JWT tests that call user_api_key_auth JWT auth is an enterprise-only feature. Tests that call user_api_key_auth with enable_jwt_auth=True must set premium_user=True on the proxy server to bypass the enterprise gate, otherwise they fail with: ValueError: JWT Auth is an enterprise only feature. This follows the same pattern as PR #21285 (fix/jwt-enterprise-license-test). Fixed tests: - test_team_token_output - test_allowed_routes_admin - test_allow_access_by_email - test_end_user_jwt_auth Co-Authored-By: Claude Sonnet 4.6 --- tests/proxy_unit_tests/test_jwt.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/proxy_unit_tests/test_jwt.py b/tests/proxy_unit_tests/test_jwt.py index f64ab888e2..964d3f60a0 100644 --- a/tests/proxy_unit_tests/test_jwt.py +++ b/tests/proxy_unit_tests/test_jwt.py @@ -418,6 +418,7 @@ async def test_team_token_output(prisma_client, audience, monkeypatch): ## 1. INITIAL TEAM CALL - should fail # use generated key to auth in + setattr(litellm.proxy.proxy_server, "premium_user", True) setattr( litellm.proxy.proxy_server, "general_settings", @@ -840,6 +841,7 @@ async def test_allowed_routes_admin( ## 1. INITIAL TEAM CALL - should fail # use generated key to auth in + setattr(litellm.proxy.proxy_server, "premium_user", True) setattr( litellm.proxy.proxy_server, "general_settings", @@ -1014,6 +1016,7 @@ async def test_allow_access_by_email( ## 1. INITIAL TEAM CALL - should fail # use generated key to auth in + setattr(litellm.proxy.proxy_server, "premium_user", True) setattr( litellm.proxy.proxy_server, "general_settings", @@ -1175,6 +1178,7 @@ async def test_end_user_jwt_auth(monkeypatch): ), ) + setattr(litellm.proxy.proxy_server, "premium_user", True) setattr( litellm.proxy.proxy_server, "general_settings",