From 3cc94609226ae79572e1e8518fe561451eea63a7 Mon Sep 17 00:00:00 2001 From: Cole McIntosh Date: Wed, 4 Jun 2025 14:55:29 -0600 Subject: [PATCH] Add SSO settings response model in proxy_setting_endpoints.py - Introduced SSOSettingsResponse model to encapsulate SSO configuration values and schema information. - Updated the get_sso_settings endpoint to utilize the new response model, enhancing API clarity and usability. --- .../ui_crud_endpoints/proxy_setting_endpoints.py | 13 ++++++++++++- 1 file changed, 12 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 23e929d57a5..c68cf603b4f 100644 --- a/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py +++ b/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py @@ -1,5 +1,5 @@ #### CRUD ENDPOINTS for UI Settings ##### -from typing import Any, List, Union +from typing import Any, Dict, List, Union from fastapi import APIRouter, Depends, HTTPException @@ -16,6 +16,16 @@ class IPAddress(BaseModel): ip: str +class SSOSettingsResponse(BaseModel): + """Response model for SSO settings with values and schema information""" + + values: Dict[str, Any] + """The current SSO configuration values""" + + schema: Dict[str, Any] + """Schema information including descriptions and property types for UI display""" + + @router.get( "/get/allowed_ips", tags=["Budget & Spend Tracking"], @@ -287,6 +297,7 @@ async def update_default_team_settings(settings: DefaultTeamSSOParams): "/get/sso_settings", tags=["SSO Settings"], dependencies=[Depends(user_api_key_auth)], + response_model=SSOSettingsResponse, ) async def get_sso_settings(): """