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
update_internal_user_settings
Ishaan Jaff508b474a1f6c
diff --git a/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py b/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.pyindex 294a580a7f8..8d476d74dd7 100644--- a/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py+++ b/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py@@ -161,3 +161,39 @@ async def get_sso_settings():}return result+++ "/update/internal_user_settings",+ tags=["SSO Settings"],+ dependencies=[Depends(user_api_key_auth)],+)+async def update_internal_user_settings(settings: DefaultInternalUserParams):+ """+ Update the default internal user parameters for SSO users.+ These settings will be applied to new users who sign in via SSO.+ """+ from litellm.proxy.proxy_server import proxy_config++ # Update the in-memory settings+ litellm.default_internal_user_params = settings.model_dump(exclude_none=True)++ # Load existing config+ config = await proxy_config.get_config()++ # Update config with new settings+ if "litellm_settings" not in config:+ config["litellm_settings"] = {}++ config["litellm_settings"]["default_internal_user_params"] = settings.model_dump(+ exclude_none=True+ )++ # Save the updated config+ await proxy_config.save_config(new_config=config)++ return {+ "message": "Internal user settings updated successfully",+ "status": "success",+ "settings": litellm.default_internal_user_params,+ }