From 2d2e7464ad88a9ca0907fbc31ca15197d192403c Mon Sep 17 00:00:00 2001 From: mubashir1osmani Date: Tue, 7 Jul 2026 19:47:23 -0400 Subject: [PATCH] Update litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py b/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py index 62340795c9b..6b1d757504d 100644 --- a/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py +++ b/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py @@ -780,7 +780,9 @@ async def get_sso_settings(): # Build SSO config from database values, falling back to the environment so # env-configured SSO still populates the UI. Stored DB values win on overlap. env_fallback = { - field: os.environ[env_var] for field, env_var in _SSO_FIELD_TO_ENV_VAR.items() if os.environ.get(env_var) + field: val + for field, env_var in _SSO_FIELD_TO_ENV_VAR.items() + if (val := os.environ.get(env_var)) } merged_sso_settings = {**env_fallback, **decrypted_sso_settings_dict}