mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix get_sso_settings
This commit is contained in:
parent
5e1e25d98d
commit
5d8b288570
1 changed files with 10 additions and 7 deletions
|
@ -123,14 +123,17 @@ async def get_sso_settings():
|
||||||
"""
|
"""
|
||||||
from pydantic import TypeAdapter
|
from pydantic import TypeAdapter
|
||||||
|
|
||||||
|
from litellm.proxy.proxy_server import proxy_config
|
||||||
|
|
||||||
|
# Load existing config
|
||||||
|
config = await proxy_config.get_config()
|
||||||
|
litellm_settings = config.get("litellm_settings", {}) or {}
|
||||||
|
default_internal_user_params = (
|
||||||
|
litellm_settings.get("default_internal_user_params", {}) or {}
|
||||||
|
)
|
||||||
|
|
||||||
# Create the settings object first
|
# Create the settings object first
|
||||||
sso_settings = DefaultInternalUserParams(
|
sso_settings = DefaultInternalUserParams(**(default_internal_user_params))
|
||||||
**(
|
|
||||||
litellm.default_internal_user_params
|
|
||||||
if isinstance(litellm.default_internal_user_params, dict)
|
|
||||||
else {}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
# 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)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue