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 on ui
Ishaan Jaff30add0e64c6d
diff --git a/ui/litellm-dashboard/src/components/SSOSettings.tsx b/ui/litellm-dashboard/src/components/SSOSettings.tsxindex 21d44c93d8d..21c10b7cec7 100644--- a/ui/litellm-dashboard/src/components/SSOSettings.tsx+++ b/ui/litellm-dashboard/src/components/SSOSettings.tsx@@ -43,10 +43,9 @@ const SSOSettings: React.FC<SSOSettingsProps> = ({ accessToken }) => {setSaving(true);try {- await updateInternalUserSettings(accessToken, editedValues);- setSettings({...settings, values: editedValues});+ const updatedSettings = await updateInternalUserSettings(accessToken, editedValues);+ setSettings({...settings, values: updatedSettings.settings});setIsEditing(false);- message.success("Settings updated successfully");} catch (error) {console.error("Error updating SSO settings:", error);message.error("Failed to update settings");diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsxindex 255a72fca26..1079b5b2787 100644--- a/ui/litellm-dashboard/src/components/networking.tsx+++ b/ui/litellm-dashboard/src/components/networking.tsx@@ -4006,3 +4006,37 @@ export const getInternalUserSettings = async (accessToken: string) => {}};++export const updateInternalUserSettings = async (accessToken: string, settings: Record<string, any>) => {+ try {+ // Construct base URL+ let url = proxyBaseUrl+ ? `${proxyBaseUrl}/update/internal_user_settings`+ : `/update/internal_user_settings`;++ console.log("Updating internal user settings:", settings);++ const response = await fetch(url, {+ method: "PATCH",+ headers: {+ [globalLitellmHeaderName]: `Bearer ${accessToken}`,+ "Content-Type": "application/json",+ },+ body: JSON.stringify(settings),+ });++ if (!response.ok) {+ const errorData = await response.text();+ handleError(errorData);+ throw new Error("Network response was not ok");+ }++ const data = await response.json();+ console.log("Updated internal user settings:", data);+ message.success("Internal user settings updated successfully");+ return data;+ } catch (error) {+ console.error("Failed to update internal user settings:", error);+ throw error;+ }+};