The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Fix SSO test flakiness by mocking premium_user correctly
Julio Quinteros Pro12fddb4b8a9d
diff --git a/tests/test_litellm/proxy/test_proxy_server.py b/tests/test_litellm/proxy/test_proxy_server.pyindex d65df0087ad..5052cf288b5 100644--- a/tests/test_litellm/proxy/test_proxy_server.py+++ b/tests/test_litellm/proxy/test_proxy_server.py@@ -262,6 +262,11 @@ def test_sso_key_generate_shows_deprecation_banner(client_no_auth, monkeypatch):"litellm.proxy.management_endpoints.ui_sso.SSOAuthenticationHandler.should_use_sso_handler",lambda *args, **kwargs: False,)+ # Mock premium_user to bypass enterprise check (prevents 403 Forbidden)+ monkeypatch.setattr(+ "litellm.proxy.proxy_server.premium_user",+ True,+ )monkeypatch.setenv("UI_USERNAME", "admin")response = client_no_auth.get("/sso/key/generate")