Skip to content

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]

fix(ui_sso.py): fix faulty admin check

Krrish Dholakia22d95c99b56c
diff --git a/litellm/proxy/_new_secret_config.yaml b/litellm/proxy/_new_secret_config.yaml
index 90c9fc3d98a..5021d3e0732 100644
--- a/litellm/proxy/_new_secret_config.yaml
+++ b/litellm/proxy/_new_secret_config.yaml
@@ -5,8 +5,5 @@ model_list:
api_key: os.environ/OPENAI_API_KEY
-assistant_settings:
- custom_llm_provider: azure
- litellm_params:
- api_key: os.environ/AZURE_API_KEY
- api_base: os.environ/AZURE_API_BASE
+general_settings:
+ ui_access_mode: admin_only
diff --git a/litellm/proxy/management_endpoints/ui_sso.py b/litellm/proxy/management_endpoints/ui_sso.py
index d2b0e551ad7..7f2cc1c2168 100644
--- a/litellm/proxy/management_endpoints/ui_sso.py
+++ b/litellm/proxy/management_endpoints/ui_sso.py
@@ -547,7 +547,7 @@ async def auth_callback(request: Request):
## CHECK IF ROLE ALLOWED TO USE PROXY ##
if ui_access_mode == "admin_only" and (
user_role != LitellmUserRoles.PROXY_ADMIN.value
- or user_role != LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY.value
+ and user_role != LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY.value
):
verbose_proxy_logger.debug("EXCEPTION RAISED")
raise HTTPException(