fix get_sso_settings

This commit is contained in:
Ishaan Jaff 2025-03-17 18:06:09 -07:00
parent 5e1e25d98d
commit 5d8b288570

View file

@ -123,14 +123,17 @@ async def get_sso_settings():
""" """
from pydantic import TypeAdapter from pydantic import TypeAdapter
# Create the settings object first from litellm.proxy.proxy_server import proxy_config
sso_settings = DefaultInternalUserParams(
**( # Load existing config
litellm.default_internal_user_params config = await proxy_config.get_config()
if isinstance(litellm.default_internal_user_params, dict) litellm_settings = config.get("litellm_settings", {}) or {}
else {} default_internal_user_params = (
) litellm_settings.get("default_internal_user_params", {}) or {}
) )
# Create the settings object first
sso_settings = DefaultInternalUserParams(**(default_internal_user_params))
# Get the schema for UISSOSettings # Get the schema for UISSOSettings
schema = TypeAdapter(DefaultInternalUserParams).json_schema(by_alias=True) schema = TypeAdapter(DefaultInternalUserParams).json_schema(by_alias=True)