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
put the error toast on the ui
tanjirobe109c2180a9
diff --git a/ui/litellm-dashboard/src/components/SCIM.tsx b/ui/litellm-dashboard/src/components/SCIM.tsxindex 21cf16fb779..4a9260a79ef 100644--- a/ui/litellm-dashboard/src/components/SCIM.tsx+++ b/ui/litellm-dashboard/src/components/SCIM.tsx@@ -21,6 +21,7 @@ import {PlusCircleOutlined} from "@ant-design/icons";import { parseErrorMessage } from "./shared/errorUtils";+import NotificationManager from "./molecules/notifications_manager";interface SCIMConfigProps {accessToken: string | null;@@ -51,7 +52,7 @@ const SCIMConfig: React.FC<SCIMConfigProps> = ({ accessToken, userID, proxySetticonst handleCreateSCIMToken = async (values: any) => {if (!accessToken || !userID) {- message.error("You need to be logged in to create a SCIM token");+ NotificationManager.fromBackend("You need to be logged in to create a SCIM token");return;}@@ -70,7 +71,7 @@ const SCIMConfig: React.FC<SCIMConfigProps> = ({ accessToken, userID, proxySettimessage.success("SCIM token created successfully");} catch (error: any) {console.error("Error creating SCIM token:", error);- message.error("Failed to create SCIM token: " + parseErrorMessage(error));+ NotificationManager.fromBackend("Failed to create SCIM token: " + parseErrorMessage(error));} finally {setIsCreatingToken(false);}diff --git a/ui/litellm-dashboard/src/components/SSOModals.tsx b/ui/litellm-dashboard/src/components/SSOModals.tsxindex 763242aeb63..f650badf9fa 100644--- a/ui/litellm-dashboard/src/components/SSOModals.tsx+++ b/ui/litellm-dashboard/src/components/SSOModals.tsx@@ -161,7 +161,7 @@ const SSOModals: React.FC<SSOModalsProps> = ({// Enhanced form submission handlerconst handleFormSubmit = async (formValues: Record<string, any>) => {if (!accessToken) {- message.error("No access token available");+ NotificationManager.fromBackend("No access token available");return;}@@ -173,14 +173,14 @@ const SSOModals: React.FC<SSOModalsProps> = ({handleShowInstructions(formValues);} catch (error) {console.error("Failed to save SSO settings:", error);- message.error("Failed to save SSO settings");+ NotificationManager.fromBackend("Failed to save SSO settings");}};// Handle clearing SSO settingsconst handleClearSSO = async () => {if (!accessToken) {- message.error("No access token available");+ NotificationManager.fromBackend("No access token available");return;}@@ -216,7 +216,7 @@ const SSOModals: React.FC<SSOModalsProps> = ({message.success("SSO settings cleared successfully");} catch (error) {console.error("Failed to clear SSO settings:", error);- message.error("Failed to clear SSO settings");+ NotificationManager.fromBackend("Failed to clear SSO settings");}};diff --git a/ui/litellm-dashboard/src/components/SSOSettings.tsx b/ui/litellm-dashboard/src/components/SSOSettings.tsxindex e21d7d1e004..68085b046bc 100644--- a/ui/litellm-dashboard/src/components/SSOSettings.tsx+++ b/ui/litellm-dashboard/src/components/SSOSettings.tsx@@ -56,7 +56,7 @@ const SSOSettings: React.FC<SSOSettingsProps> = ({ accessToken, possibleUIRoles,}} catch (error) {console.error("Error fetching SSO settings:", error);- message.error("Failed to fetch SSO settings");+ NotificationManager.fromBackend("Failed to fetch SSO settings");} finally {setLoading(false);}@@ -81,7 +81,7 @@ const SSOSettings: React.FC<SSOSettingsProps> = ({ accessToken, possibleUIRoles,setIsEditing(false);} catch (error) {console.error("Error updating SSO settings:", error);- message.error("Failed to update settings: " + error);+ NotificationManager.fromBackend("Failed to update settings: " + error);} finally {setSaving(false);}diff --git a/ui/litellm-dashboard/src/components/TeamSSOSettings.tsx b/ui/litellm-dashboard/src/components/TeamSSOSettings.tsxindex 93e1e98f5c1..3c62f0b67ed 100644--- a/ui/litellm-dashboard/src/components/TeamSSOSettings.tsx+++ b/ui/litellm-dashboard/src/components/TeamSSOSettings.tsx@@ -4,6 +4,7 @@ import { Typography, Spin, message, Switch, Select, Form } from "antd";import { getDefaultTeamSettings, updateDefaultTeamSettings, modelAvailableCall } from "./networking";import BudgetDurationDropdown, { getBudgetDurationLabel } from "./common_components/budget_duration_dropdown";import { getModelDisplayName } from "./key_team_helpers/fetch_available_models_team_key";+import NotificationManager from "./molecules/notifications_manager";interface TeamSSOSettingsProps {accessToken: string | null;@@ -47,7 +48,7 @@ const TeamSSOSettings: React.FC<TeamSSOSettingsProps> = ({ accessToken, userID,}} catch (error) {console.error("Error fetching team SSO settings:", error);- message.error("Failed to fetch team settings");+ NotificationManager.fromBackend("Failed to fetch team settings");} finally {setLoading(false);}@@ -67,7 +68,7 @@ const TeamSSOSettings: React.FC<TeamSSOSettingsProps> = ({ accessToken, userID,message.success("Default team settings updated successfully");} catch (error) {console.error("Error updating team settings:", error);- message.error("Failed to update team settings");+ NotificationManager.fromBackend("Failed to update team settings");} finally {setSaving(false);}diff --git a/ui/litellm-dashboard/src/components/UIAccessControlForm.tsx b/ui/litellm-dashboard/src/components/UIAccessControlForm.tsxindex def9bf6bb91..542fc9d9ab9 100644--- a/ui/litellm-dashboard/src/components/UIAccessControlForm.tsx+++ b/ui/litellm-dashboard/src/components/UIAccessControlForm.tsx@@ -2,6 +2,7 @@ import React, { useEffect, useState } from "react";import { Form, Button as Button2, Select, message } from "antd";import { Text, TextInput } from "@tremor/react";import { getSSOSettings, updateSSOSettings } from "./networking";+import NotificationManager from "./molecules/notifications_manager";interface UIAccessControlFormProps {accessToken: string | null;@@ -52,7 +53,7 @@ const UIAccessControlForm: React.FC<UIAccessControlFormProps> = ({ accessToken,const handleUIAccessSubmit = async (formValues: Record<string, any>) => {if (!accessToken) {- message.error("No access token available");+ NotificationManager.fromBackend("No access token available");return;}@@ -71,7 +72,7 @@ const UIAccessControlForm: React.FC<UIAccessControlFormProps> = ({ accessToken,onSuccess();} catch (error) {console.error("Failed to save UI access settings:", error);- message.error("Failed to save UI access settings");+ NotificationManager.fromBackend("Failed to save UI access settings");} finally {setLoading(false);}diff --git a/ui/litellm-dashboard/src/components/add_fallbacks.tsx b/ui/litellm-dashboard/src/components/add_fallbacks.tsxindex 3ab7bc7e8e6..ad27c7df1e6 100644--- a/ui/litellm-dashboard/src/components/add_fallbacks.tsx+++ b/ui/litellm-dashboard/src/components/add_fallbacks.tsx@@ -14,6 +14,7 @@ import {message,} from "antd";import { fetchAvailableModels, ModelGroup } from "./chat_ui/llm_calls/fetch_models";+import NotificationManager from "./molecules/notifications_manager";interface AddFallbacksProps {models?: string[];@@ -91,10 +92,10 @@ const AddFallbacks: React.FC<AddFallbacksProps> = ({// Update routerSettings statesetRouterSettings(updatedRouterSettings);} catch (error) {- message.error("Failed to update router settings: " + error, 20);+ NotificationManager.fromBackend("Failed to update router settings: " + error);}- message.success("router settings updated successfully");+ NotificationManager.success("router settings updated successfully");setIsModalVisible(false);form.resetFields();diff --git a/ui/litellm-dashboard/src/components/add_model/add_auto_router_tab.tsx b/ui/litellm-dashboard/src/components/add_model/add_auto_router_tab.tsxindex 863fb3b62b3..d8fffc5ba34 100644--- a/ui/litellm-dashboard/src/components/add_model/add_auto_router_tab.tsx+++ b/ui/litellm-dashboard/src/components/add_model/add_auto_router_tab.tsx@@ -11,6 +11,7 @@ import { all_admin_roles } from "@/utils/roles";import { handleAddAutoRouterSubmit } from "./handle_add_auto_router_submit";import { fetchAvailableModels, ModelGroup } from "../chat_ui/llm_calls/fetch_models";import RouterConfigBuilder from "./router_config_builder";+import NotificationManager from "../molecules/notifications_manager";interface AddAutoRouterTabProps {form: FormInstance;@@ -79,12 +80,12 @@ const AddAutoRouterTab: React.FC<AddAutoRouterTabProps> = ({// Check basic required fields firstif (!currentFormValues.auto_router_name) {- message.error("Please enter an Auto Router Name");+ NotificationManager.fromBackend("Please enter an Auto Router Name");return;}if (!currentFormValues.auto_router_default_model) {- message.error("Please select a Default Model");+ NotificationManager.fromBackend("Please select a Default Model");return;}@@ -98,7 +99,7 @@ const AddAutoRouterTab: React.FC<AddAutoRouterTabProps> = ({// Custom validation for router configif (!routerConfig || !routerConfig.routes || routerConfig.routes.length === 0) {- message.error("Please configure at least one route for the auto router");+ NotificationManager.fromBackend("Please configure at least one route for the auto router");return;}@@ -108,7 +109,7 @@ const AddAutoRouterTab: React.FC<AddAutoRouterTabProps> = ({);if (invalidRoutes.length > 0) {- message.error("Please ensure all routes have a target model, description, and at least one utterance");+ NotificationManager.fromBackend("Please ensure all routes have a target model, description, and at least one utterance");return;}@@ -139,9 +140,9 @@ const AddAutoRouterTab: React.FC<AddAutoRouterTabProps> = ({};return friendlyNames[fieldName] || fieldName;});- message.error(`Please fill in the following required fields: ${missingFields.join(', ')}`);+ NotificationManager.fromBackend(`Please fill in the following required fields: ${missingFields.join(', ')}`);} else {- message.error("Please fill in all required fields");+ NotificationManager.fromBackend("Please fill in all required fields");}});};diff --git a/ui/litellm-dashboard/src/components/add_model/handle_add_auto_router_submit.tsx b/ui/litellm-dashboard/src/components/add_model/handle_add_auto_router_submit.tsxindex 718e4062df3..4272dc68b0a 100644--- a/ui/litellm-dashboard/src/components/add_model/handle_add_auto_router_submit.tsx+++ b/ui/litellm-dashboard/src/components/add_model/handle_add_auto_router_submit.tsx@@ -1,5 +1,6 @@import { message } from "antd";import { modelCreateCall, Model } from "../networking";+import NotificationManager from "../molecules/notifications_manager";export const handleAddAutoRouterSubmit = async (values: any,@@ -55,6 +56,6 @@ export const handleAddAutoRouterSubmit = async (} catch (error) {console.error("Failed to add auto router:", error);- message.error("Failed to add auto router: " + error, 10);+ NotificationManager.fromBackend("Failed to add auto router: " + error);}};\ No newline at end of filediff --git a/ui/litellm-dashboard/src/components/add_model/handle_add_model_submit.tsx b/ui/litellm-dashboard/src/components/add_model/handle_add_model_submit.tsxindex ff942c10a9d..8aafd3f04e7 100644--- a/ui/litellm-dashboard/src/components/add_model/handle_add_model_submit.tsx+++ b/ui/litellm-dashboard/src/components/add_model/handle_add_model_submit.tsx@@ -3,6 +3,7 @@ import { provider_map, Providers } from "../provider_info_helpers";import { modelCreateCall, Model, testConnectionRequest } from "../networking";import React, { useState } from 'react';import ConnectionErrorDisplay from './model_connection_test';+import NotificationManager from "../molecules/notifications_manager";export const prepareModelAddRequest = async (formValues: Record<string, any>,@@ -100,9 +101,8 @@ export const prepareModelAddRequest = async (try {litellmExtraParams = JSON.parse(value);} catch (error) {- message.error(- "Failed to parse LiteLLM Extra Params: " + error,- 10+ NotificationManager.fromBackend(+ "Failed to parse LiteLLM Extra Params: " + error);throw new Error("Failed to parse litellm_extra_params: " + error);}@@ -117,9 +117,8 @@ export const prepareModelAddRequest = async (try {modelInfoParams = JSON.parse(value);} catch (error) {- message.error(- "Failed to parse LiteLLM Extra Params: " + error,- 10+ NotificationManager.fromBackend(+ "Failed to parse LiteLLM Extra Params: " + error);throw new Error("Failed to parse litellm_extra_params: " + error);}@@ -151,7 +150,7 @@ export const prepareModelAddRequest = async (return deployments;} catch (error) {- message.error("Failed to create model: " + error, 10);+ NotificationManager.fromBackend("Failed to create model: " + error);}};@@ -185,7 +184,7 @@ export const handleAddModelSubmit = async (callback && callback();form.resetFields();} catch (error) {- message.error("Failed to add model: " + error, 10);+ NotificationManager.fromBackend("Failed to add model: " + error);}};diff --git a/ui/litellm-dashboard/src/components/add_pass_through.tsx b/ui/litellm-dashboard/src/components/add_pass_through.tsxindex ac19d0b6a3c..21f828e26d2 100644--- a/ui/litellm-dashboard/src/components/add_pass_through.tsx+++ b/ui/litellm-dashboard/src/components/add_pass_through.tsx@@ -28,6 +28,7 @@ import { list } from "postcss";import KeyValueInput from "./key_value_input";import { passThroughItem } from "./pass_through_settings";import RoutePreview from "./route_preview";+import NotificationManager from "./molecules/notifications_manager";const { Option } = Select2;interface AddFallbacksProps {@@ -87,7 +88,7 @@ const AddPassThroughEndpoint: React.FC<AddFallbacksProps> = ({setIncludeSubpath(true);setIsModalVisible(false);} catch (error) {- message.error("Error creating pass-through endpoint: " + error, 20);+ NotificationManager.fromBackend("Error creating pass-through endpoint: " + error);} finally {setIsLoading(false);}diff --git a/ui/litellm-dashboard/src/components/admins.tsx b/ui/litellm-dashboard/src/components/admins.tsxindex b743dd6f17f..ef6f49900a3 100644--- a/ui/litellm-dashboard/src/components/admins.tsx+++ b/ui/litellm-dashboard/src/components/admins.tsx@@ -46,6 +46,7 @@ import { ssoProviderConfigs } from './SSOModals';import SCIMConfig from "./SCIM";import UIAccessControlForm from "./UIAccessControlForm";import UsefulLinksManagement from "./useful_links_management";+import NotificationManager from "./molecules/notifications_manager";interface AdminPanelProps {searchParams: any;@@ -150,7 +151,7 @@ const AdminPanel: React.FC<AdminPanelProps> = ({const handleShowAllowedIPs = async () => {try {if (premiumUser !== true) {- message.error(+ NotificationManager.fromBackend("This feature is only available for premium users. Please upgrade your account.")return@@ -163,7 +164,7 @@ const AdminPanel: React.FC<AdminPanelProps> = ({}} catch (error) {console.error("Error fetching allowed IPs:", error);- message.error(`Failed to fetch allowed IPs ${error}`);+ NotificationManager.fromBackend(`Failed to fetch allowed IPs ${error}`);setAllowedIPs([all_ip_address_allowed]);} finally {if (premiumUser === true) {@@ -183,7 +184,7 @@ const AdminPanel: React.FC<AdminPanelProps> = ({}} catch (error) {console.error("Error adding IP:", error);- message.error(`Failed to add IP address ${error}`);+ NotificationManager.fromBackend(`Failed to add IP address ${error}`);} finally {setIsAddIPModalVisible(false);}@@ -204,7 +205,7 @@ const AdminPanel: React.FC<AdminPanelProps> = ({message.success('IP address deleted successfully');} catch (error) {console.error("Error deleting IP:", error);- message.error(`Failed to delete IP address ${error}`);+ NotificationManager.fromBackend(`Failed to delete IP address ${error}`);} finally {setIsDeleteIPModalVisible(false);setIPToDelete(null);@@ -564,7 +565,7 @@ const AdminPanel: React.FC<AdminPanelProps> = ({<div><Buttonstyle={{ width: '150px' }}- onClick={() => premiumUser === true ? setIsAddSSOModalVisible(true) : message.error("Only premium users can add SSO")}+ onClick={() => premiumUser === true ? setIsAddSSOModalVisible(true) : NotificationManager.fromBackend("Only premium users can add SSO")}>{ssoConfigured ? "Edit SSO Settings" : "Add SSO"}</Button>@@ -580,7 +581,7 @@ const AdminPanel: React.FC<AdminPanelProps> = ({<div><Buttonstyle={{ width: '150px' }}- onClick={() => premiumUser === true ? setIsUIAccessControlModalVisible(true) : message.error("Only premium users can configure UI access control")}+ onClick={() => premiumUser === true ? setIsUIAccessControlModalVisible(true) : NotificationManager.fromBackend("Only premium users can configure UI access control")}>UI Access Control</Button>diff --git a/ui/litellm-dashboard/src/components/budgets/budget_modal.tsx b/ui/litellm-dashboard/src/components/budgets/budget_modal.tsxindex cca08768219..31eb650420c 100644--- a/ui/litellm-dashboard/src/components/budgets/budget_modal.tsx+++ b/ui/litellm-dashboard/src/components/budgets/budget_modal.tsx@@ -18,6 +18,7 @@ import {message,} from "antd";import { budgetCreateCall } from "../networking";+import NotificationManager from "../molecules/notifications_manager";interface BudgetModalProps {isModalVisible: boolean;@@ -58,7 +59,7 @@ const BudgetModal: React.FC<BudgetModalProps> = ({form.resetFields();} catch (error) {console.error("Error creating the key:", error);- message.error(`Error creating the key: ${error}`, 20);+ NotificationManager.fromBackend(`Error creating the key: ${error}`);}};diff --git a/ui/litellm-dashboard/src/components/budgets/edit_budget_modal.tsx b/ui/litellm-dashboard/src/components/budgets/edit_budget_modal.tsxindex cfd225dd6de..37df33e8a43 100644--- a/ui/litellm-dashboard/src/components/budgets/edit_budget_modal.tsx+++ b/ui/litellm-dashboard/src/components/budgets/edit_budget_modal.tsx@@ -19,6 +19,7 @@ import {} from "antd";import { budgetUpdateCall } from "../networking";import { budgetItem } from "./budget_panel";+import NotificationManager from "../molecules/notifications_manager";interface BudgetModalProps {isModalVisible: boolean;@@ -69,7 +70,7 @@ const EditBudgetModal: React.FC<BudgetModalProps> = ({handleUpdateCall();} catch (error) {console.error("Error creating the key:", error);- message.error(`Error creating the key: ${error}`, 20);+ NotificationManager.fromBackend(`Error creating the key: ${error}`);}};diff --git a/ui/litellm-dashboard/src/components/bulk_create_users_button.tsx b/ui/litellm-dashboard/src/components/bulk_create_users_button.tsxindex f7a892d6466..f98b175beca 100644--- a/ui/litellm-dashboard/src/components/bulk_create_users_button.tsx+++ b/ui/litellm-dashboard/src/components/bulk_create_users_button.tsx@@ -14,6 +14,7 @@ import Papa from "papaparse"import { CheckCircleIcon, XCircleIcon, ExclamationIcon } from "@heroicons/react/outline"import { CopyToClipboard } from "react-copy-to-clipboard"import { InvitationLink } from "./onboarding_link"+import NotificationManager from "./molecules/notifications_manager"interface BulkCreateUsersProps {accessToken: string@@ -110,7 +111,7 @@ const BulkCreateUsersButton: React.FC<BulkCreateUsersProps> = ({// Check file typeif (file.type !== "text/csv" && !file.name.endsWith(".csv")) {setFileError(`Invalid file type: ${file.name}. Please upload a CSV file (.csv extension).`)- message.error("Invalid file type. Please upload a CSV file.")+ NotificationManager.fromBackend("Invalid file type. Please upload a CSV file.")return false}diff --git a/ui/litellm-dashboard/src/components/bulk_edit_user.tsx b/ui/litellm-dashboard/src/components/bulk_edit_user.tsxindex 4c0be6eb71e..c4ae4a97d38 100644--- a/ui/litellm-dashboard/src/components/bulk_edit_user.tsx+++ b/ui/litellm-dashboard/src/components/bulk_edit_user.tsx@@ -16,6 +16,7 @@ import {import { Button } from '@tremor/react';import { userBulkUpdateUserCall, teamBulkMemberAddCall, Member } from "./networking";import { UserEditView } from "./user_edit_view";+import NotificationManager from "./molecules/notifications_manager";const { Text, Title } = Typography;@@ -80,7 +81,7 @@ const BulkEditUserModal: React.FC<BulkEditUserModalProps> = ({const handleSubmit = async (formValues: any) => {console.log("formValues", formValues);if (!accessToken) {- message.error("Access token not found");+ NotificationManager.fromBackend("Access token not found");return;}@@ -112,7 +113,7 @@ const BulkEditUserModal: React.FC<BulkEditUserModalProps> = ({const hasTeamAdditions = addToTeams && selectedTeams.length > 0;if (!hasUserUpdates && !hasTeamAdditions) {- message.error("Please modify at least one field or select teams to add users to");+ NotificationManager.fromBackend("Please modify at least one field or select teams to add users to");return;}@@ -201,7 +202,7 @@ const BulkEditUserModal: React.FC<BulkEditUserModalProps> = ({onCancel();} catch (error) {console.error("Bulk operation failed:", error);- message.error("Failed to perform bulk operations");+ NotificationManager.fromBackend("Failed to perform bulk operations");} finally {setLoading(false);}diff --git a/ui/litellm-dashboard/src/components/chat_ui.tsx b/ui/litellm-dashboard/src/components/chat_ui.tsxindex c7aae0d8966..22e9f0149de 100644--- a/ui/litellm-dashboard/src/components/chat_ui.tsx+++ b/ui/litellm-dashboard/src/components/chat_ui.tsx@@ -72,6 +72,7 @@ import {FilePdfOutlined,ArrowUpOutlined} from "@ant-design/icons";+import NotificationManager from "./molecules/notifications_manager";const { TextArea } = Input;const { Dragger } = Upload;@@ -516,7 +517,7 @@ const ChatUI: React.FC<ChatUIProps> = ({// For image edits, require both image and promptif (endpointType === EndpointType.IMAGE_EDITS && !uploadedImage) {- message.error("Please upload an image for editing");+ NotificationManager.fromBackend("Please upload an image for editing");return;}@@ -527,7 +528,7 @@ const ChatUI: React.FC<ChatUIProps> = ({const effectiveApiKey = apiKeySource === 'session' ? accessToken : apiKey;if (!effectiveApiKey) {- message.error("Please provide an API key or select Current UI Session");+ NotificationManager.fromBackend("Please provide an API key or select Current UI Session");return;}@@ -543,7 +544,7 @@ const ChatUI: React.FC<ChatUIProps> = ({try {newUserMessage = await createMultimodalMessage(inputMessage, responsesUploadedImage);} catch (error) {- message.error("Failed to process image. Please try again.");+ NotificationManager.fromBackend("Failed to process image. Please try again.");return;}}@@ -552,7 +553,7 @@ const ChatUI: React.FC<ChatUIProps> = ({try {newUserMessage = await createChatMultimodalMessage(inputMessage, chatUploadedImage);} catch (error) {- message.error("Failed to process image. Please try again.");+ NotificationManager.fromBackend("Failed to process image. Please try again.");return;}} else {diff --git a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/anthropic_messages.tsx b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/anthropic_messages.tsxindex 862d89973f9..573c1cc2917 100644--- a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/anthropic_messages.tsx+++ b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/anthropic_messages.tsx@@ -3,6 +3,7 @@ import Anthropic from "@anthropic-ai/sdk";import { MessageType } from "../types";import { TokenUsage } from "../ResponseMetrics";import { getProxyBaseUrl } from "@/components/networking";+import NotificationManager from "@/components/molecules/notifications_manager";export async function makeAnthropicMessagesRequest(messages: MessageType[],@@ -122,9 +123,8 @@ export async function makeAnthropicMessagesRequest(if (signal?.aborted) {console.log("Anthropic messages request was cancelled");} else {- message.error(- `Error occurred while generating model response. Please try again. Error: ${error}`,- 20,+ NotificationManager.fromBackend(+ `Error occurred while generating model response. Please try again. Error: ${error}`);}throw error;diff --git a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/fetch_mcp_tools.tsx b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/fetch_mcp_tools.tsxindex 99596f1dbd5..cd9368460ed 100644--- a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/fetch_mcp_tools.tsx+++ b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/fetch_mcp_tools.tsx@@ -1,3 +1,4 @@+import NotificationManager from "@/components/molecules/notifications_manager";import { mcpToolsCall } from "../../networking";import { message } from "antd";@@ -27,7 +28,7 @@ export async function fetchAvailableMCPTools(return data.tools || [];} catch (error) {console.error("Error fetching MCP tools:", error);- message.error("Failed to fetch MCP tools");+ NotificationManager.fromBackend("Failed to fetch MCP tools");return [];}}\ No newline at end of filediff --git a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_edits.tsx b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_edits.tsxindex 62f4d6bbbd1..dd3cf96c3ec 100644--- a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_edits.tsx+++ b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_edits.tsx@@ -1,6 +1,7 @@import openai from "openai";import { message } from "antd";import { getProxyBaseUrl } from "@/components/networking";+import NotificationManager from "@/components/molecules/notifications_manager";export async function makeOpenAIImageEditsRequest(imageFile: File,@@ -54,7 +55,7 @@ export async function makeOpenAIImageEditsRequest(if (signal?.aborted) {console.log("Image edits request was cancelled");} else {- message.error(`Error occurred while editing image. Please try again. Error: ${error}`, 20);+ NotificationManager.fromBackend(`Error occurred while editing image. Please try again. Error: ${error}`);}throw error; // Re-throw to allow the caller to handle the error}diff --git a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_generation.tsx b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_generation.tsxindex 1d03f82c16f..dbd9e7b3834 100644--- a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_generation.tsx+++ b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_generation.tsx@@ -1,6 +1,7 @@import openai from "openai";import { message } from "antd";import { getProxyBaseUrl } from "@/components/networking";+import NotificationManager from "@/components/molecules/notifications_manager";export async function makeOpenAIImageGenerationRequest(prompt: string,@@ -51,7 +52,7 @@ export async function makeOpenAIImageGenerationRequest(if (signal?.aborted) {console.log("Image generation request was cancelled");} else {- message.error(`Error occurred while generating image. Please try again. Error: ${error}`, 20);+ NotificationManager.fromBackend(`Error occurred while generating image. Please try again. Error: ${error}`);}throw error; // Re-throw to allow the caller to handle the error}diff --git a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/responses_api.tsx b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/responses_api.tsxindex 71033e5d9d3..b6d656bc708 100644--- a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/responses_api.tsx+++ b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/responses_api.tsx@@ -4,6 +4,7 @@ import { MessageType } from "../types";import { TokenUsage } from "../ResponseMetrics";import { getProxyBaseUrl } from "@/components/networking";import { MCPTool } from "@/components/chat_ui/llm_calls/fetch_mcp_tools";+import NotificationManager from "@/components/molecules/notifications_manager";export async function makeOpenAIResponsesRequest(messages: MessageType[],@@ -181,7 +182,7 @@ export async function makeOpenAIResponsesRequest(if (signal?.aborted) {console.log("Responses API request was cancelled");} else {- message.error(`Error occurred while generating model response. Please try again. Error: ${error}`, 20);+ NotificationManager.fromBackend(`Error occurred while generating model response. Please try again. Error: ${error}`);}throw error; // Re-throw to allow the caller to handle the error}diff --git a/ui/litellm-dashboard/src/components/cloudzero_export_modal.tsx b/ui/litellm-dashboard/src/components/cloudzero_export_modal.tsxindex a7b585e89e8..47f9b8561ad 100644--- a/ui/litellm-dashboard/src/components/cloudzero_export_modal.tsx+++ b/ui/litellm-dashboard/src/components/cloudzero_export_modal.tsx@@ -8,6 +8,7 @@ import {TextInput,} from "@tremor/react";import { Modal, Form, Input, message, Spin, Select } from "antd";+import NotificationManager from "./molecules/notifications_manager";interface CloudZeroExportModalProps {isOpen: boolean;@@ -68,11 +69,11 @@ const CloudZeroExportModal: React.FC<CloudZeroExportModalProps> = ({} else if (response.status !== 404) {// 404 means no settings configured yet, which is fineconst errorData = await response.json();- message.error(`Failed to load existing settings: ${errorData.error || 'Unknown error'}`);+ NotificationManager.fromBackend(`Failed to load existing settings: ${errorData.error || 'Unknown error'}`);}} catch (error) {console.error("Error loading CloudZero settings:", error);- message.error("Failed to load existing settings");+ NotificationManager.fromBackend("Failed to load existing settings");} finally {setSettingsLoading(false);}@@ -80,7 +81,7 @@ const CloudZeroExportModal: React.FC<CloudZeroExportModalProps> = ({const handleSaveCloudZeroSettings = async (values: CloudZeroSettings) => {if (!accessToken) {- message.error("No access token available");+ NotificationManager.fromBackend("No access token available");return;}@@ -115,12 +116,12 @@ const CloudZeroExportModal: React.FC<CloudZeroExportModalProps> = ({});return true;} else {- message.error(data.error || "Failed to save CloudZero settings");+ NotificationManager.fromBackend(data.error || "Failed to save CloudZero settings");return false;}} catch (error) {console.error("Error saving CloudZero settings:", error);- message.error("Failed to save CloudZero settings");+ NotificationManager.fromBackend("Failed to save CloudZero settings");return false;} finally {setLoading(false);@@ -129,7 +130,7 @@ const CloudZeroExportModal: React.FC<CloudZeroExportModalProps> = ({const handleExportCloudZero = async () => {if (!accessToken) {- message.error("No access token available");+ NotificationManager.fromBackend("No access token available");return;}@@ -153,11 +154,11 @@ const CloudZeroExportModal: React.FC<CloudZeroExportModalProps> = ({message.success(data.message || "Export to CloudZero completed successfully");onClose();} else {- message.error(data.error || "Failed to export to CloudZero");+ NotificationManager.fromBackend(data.error || "Failed to export to CloudZero");}} catch (error) {console.error("Error exporting to CloudZero:", error);- message.error("Failed to export to CloudZero");+ NotificationManager.fromBackend("Failed to export to CloudZero");} finally {setExportLoading(false);}@@ -171,7 +172,7 @@ const CloudZeroExportModal: React.FC<CloudZeroExportModalProps> = ({onClose();} catch (error) {console.error("Error exporting CSV:", error);- message.error("Failed to export CSV");+ NotificationManager.fromBackend("Failed to export CSV");} finally {setExportLoading(false);}diff --git a/ui/litellm-dashboard/src/components/common_components/ModelAliasManager.tsx b/ui/litellm-dashboard/src/components/common_components/ModelAliasManager.tsxindex db49e1d999c..eb9372403ca 100644--- a/ui/litellm-dashboard/src/components/common_components/ModelAliasManager.tsx+++ b/ui/litellm-dashboard/src/components/common_components/ModelAliasManager.tsx@@ -13,6 +13,7 @@ import {TableCell} from "@tremor/react";import ModelSelector from "./ModelSelector";+import NotificationManager from "../molecules/notifications_manager";interface ModelAliasManagerProps {accessToken: string;@@ -49,13 +50,13 @@ const ModelAliasManager: React.FC<ModelAliasManagerProps> = ({const handleAddAlias = () => {if (!newAlias.aliasName || !newAlias.targetModel) {- message.error("Please provide both alias name and target model");+ NotificationManager.fromBackend("Please provide both alias name and target model");return;}// Check for duplicate alias namesif (aliases.some(alias => alias.aliasName === newAlias.aliasName)) {- message.error("An alias with this name already exists");+ NotificationManager.fromBackend("An alias with this name already exists");return;}@@ -90,13 +91,13 @@ const ModelAliasManager: React.FC<ModelAliasManagerProps> = ({if (!editingAlias) return;if (!editingAlias.aliasName || !editingAlias.targetModel) {- message.error("Please provide both alias name and target model");+ NotificationManager.fromBackend("Please provide both alias name and target model");return;}// Check for duplicate alias names (excluding current alias)if (aliases.some(alias => alias.id !== editingAlias.id && alias.aliasName === editingAlias.aliasName)) {- message.error("An alias with this name already exists");+ NotificationManager.fromBackend("An alias with this name already exists");return;}diff --git a/ui/litellm-dashboard/src/components/create_user_button.tsx b/ui/litellm-dashboard/src/components/create_user_button.tsxindex fe706abab79..c1aad1811a0 100644--- a/ui/litellm-dashboard/src/components/create_user_button.tsx+++ b/ui/litellm-dashboard/src/components/create_user_button.tsx@@ -26,6 +26,7 @@ import { Tooltip } from "antd"import { InfoCircleOutlined } from "@ant-design/icons"import { getModelDisplayName } from "./key_team_helpers/fetch_available_models_team_key"import { useQueryClient } from "@tanstack/react-query"+import NotificationManager from "./molecules/notifications_manager"// Helper function to generate UUID compatible across all environmentsconst generateUUID = (): string => {@@ -174,7 +175,7 @@ const Createuser: React.FC<CreateuserProps> = ({localStorage.removeItem("userData" + userID)} catch (error: any) {const errorMessage = error.response?.data?.detail || error?.message || "Error creating the user"- message.error(errorMessage)+ NotificationManager.fromBackend(errorMessage)console.error("Error creating the user:", error)}}diff --git a/ui/litellm-dashboard/src/components/edit_auto_router/edit_auto_router_modal.tsx b/ui/litellm-dashboard/src/components/edit_auto_router/edit_auto_router_modal.tsxindex 580f6761feb..1f5bc1d3209 100644--- a/ui/litellm-dashboard/src/components/edit_auto_router/edit_auto_router_modal.tsx+++ b/ui/litellm-dashboard/src/components/edit_auto_router/edit_auto_router_modal.tsx@@ -4,6 +4,7 @@ import { Text, TextInput } from "@tremor/react";import { modelAvailableCall, modelPatchUpdateCall } from "../networking";import { fetchAvailableModels, ModelGroup } from "../chat_ui/llm_calls/fetch_models";import RouterConfigBuilder from "../add_model/router_config_builder";+import NotificationManager from "../molecules/notifications_manager";interface EditAutoRouterModalProps {isVisible: boolean;@@ -92,7 +93,7 @@ const EditAutoRouterModal: React.FC<EditAutoRouterModalProps> = ({} catch (error) {console.error("Error parsing auto router config:", error);- message.error("Error loading auto router configuration");+ NotificationManager.fromBackend("Error loading auto router configuration");}};@@ -135,7 +136,7 @@ const EditAutoRouterModal: React.FC<EditAutoRouterModalProps> = ({onCancel();} catch (error) {console.error("Error updating auto router:", error);- message.error("Failed to update auto router configuration");+ NotificationManager.fromBackend("Failed to update auto router configuration");} finally {setLoading(false);}diff --git a/ui/litellm-dashboard/src/components/email_settings.tsx b/ui/litellm-dashboard/src/components/email_settings.tsxindex 56219c5a39d..b6fe06a5e17 100644--- a/ui/litellm-dashboard/src/components/email_settings.tsx+++ b/ui/litellm-dashboard/src/components/email_settings.tsx@@ -8,7 +8,7 @@ import {TableCell,} from "@tremor/react";import { Typography } from "antd";-import NotificationsManager from "./molecules/notifications_manager";+import NotificationManager from "./molecules/notifications_manager";import { serviceHealthCheck, setCallbacksCall } from "./networking";import { EmailEventSettings } from "./email_events";@@ -54,9 +54,9 @@ const EmailSettings: React.FC<EmailSettingsProps> = ({};try {await setCallbacksCall(accessToken, payload);- NotificationsManager.success("Email settings updated successfully");+ NotificationManager.success("Email settings updated successfully");} catch (error) {- NotificationsManager.fromBackend(error);+ NotificationManager.fromBackend(error);}}@@ -195,9 +195,9 @@ const EmailSettings: React.FC<EmailSettingsProps> = ({if (!accessToken) return;try {await serviceHealthCheck(accessToken, "email");- NotificationsManager.success("Email test triggered. Check your configured email inbox/logs.");+ NotificationManager.success("Email test triggered. Check your configured email inbox/logs.");} catch (error) {- NotificationsManager.fromBackend(error);+ NotificationManager.fromBackend(error);}}}className="mx-2"diff --git a/ui/litellm-dashboard/src/components/general_settings.tsx b/ui/litellm-dashboard/src/components/general_settings.tsxindex d54092d1bf8..2ed238f03da 100644--- a/ui/litellm-dashboard/src/components/general_settings.tsx+++ b/ui/litellm-dashboard/src/components/general_settings.tsx@@ -63,6 +63,7 @@ import {import AddFallbacks from "./add_fallbacks";import openai from "openai";import Paragraph from "antd/es/skeleton/Paragraph";+import NotificationManager from "./molecules/notifications_manager";interface GeneralSettingsPageProps {accessToken: string | null;userRole: string | null;@@ -121,9 +122,8 @@ async function testFallbackModelResponse(</span>);} catch (error) {- message.error(+ NotificationManager.fromBackend(`Error occurred while generating model response. Please try again. Error: ${error}`,- 20);}}@@ -311,7 +311,7 @@ const GeneralSettings: React.FC<GeneralSettingsPageProps> = ({setRouterSettings(updatedSettings);message.success("Router settings updated successfully");} catch (error) {- message.error("Failed to update router settings: " + error, 20);+ NotificationManager.fromBackend("Failed to update router settings: " + error);}};@@ -432,7 +432,7 @@ const GeneralSettings: React.FC<GeneralSettingsPageProps> = ({try {setCallbacksCall(accessToken, payload);} catch (error) {- message.error("Failed to update router settings: " + error, 20);+ NotificationManager.fromBackend("Failed to update router settings: " + error);}message.success("router settings updated successfully");diff --git a/ui/litellm-dashboard/src/components/generic_key_value_manager.tsx b/ui/litellm-dashboard/src/components/generic_key_value_manager.tsxindex 520893d14ca..4525be6dd5a 100644--- a/ui/litellm-dashboard/src/components/generic_key_value_manager.tsx+++ b/ui/litellm-dashboard/src/components/generic_key_value_manager.tsx@@ -13,6 +13,7 @@ import {import { message, Input } from "antd";import { EditOutlined, DeleteOutlined, SaveOutlined, CloseOutlined } from "@ant-design/icons";import { ChevronDownIcon, ChevronRightIcon, PlusCircleIcon } from "@heroicons/react/outline";+import NotificationManager from "./molecules/notifications_manager";interface KeyValueItem {id?: string;@@ -73,7 +74,7 @@ const GenericKeyValueManager: React.FC<GenericKeyValueManagerProps> = ({setNewKey("");setNewValue("");} else {- message.error(`Please provide both ${keyLabel.toLowerCase()} and ${valueLabel.toLowerCase()}`);+ NotificationManager.fromBackend(`Please provide both ${keyLabel.toLowerCase()} and ${valueLabel.toLowerCase()}`);}}, [newKey, newValue, items, onItemsChange, keyLabel, valueLabel]);@@ -93,7 +94,7 @@ const GenericKeyValueManager: React.FC<GenericKeyValueManagerProps> = ({setEditingKey("");setEditingValue("");} else {- message.error(`Please provide both ${keyLabel.toLowerCase()} and ${valueLabel.toLowerCase()}`);+ NotificationManager.fromBackend(`Please provide both ${keyLabel.toLowerCase()} and ${valueLabel.toLowerCase()}`);}}, [editingKey, editingValue, items, editingItem, onItemsChange, keyLabel, valueLabel]);diff --git a/ui/litellm-dashboard/src/components/guardrails.tsx b/ui/litellm-dashboard/src/components/guardrails.tsxindex 8f7d8fb3a1d..4e09ecda632 100644--- a/ui/litellm-dashboard/src/components/guardrails.tsx+++ b/ui/litellm-dashboard/src/components/guardrails.tsx@@ -7,6 +7,7 @@ import AddGuardrailForm from "./guardrails/add_guardrail_form"import GuardrailTable from "./guardrails/guardrail_table"import { isAdminRole } from "@/utils/roles"import GuardrailInfoView from "./guardrails/guardrail_info"+import NotificationManager from "./molecules/notifications_manager";interface GuardrailsPanelProps {accessToken: string | null@@ -91,7 +92,7 @@ const GuardrailsPanel: React.FC<GuardrailsPanelProps> = ({ accessToken, userRolefetchGuardrails() // Refresh the list} catch (error) {console.error("Error deleting guardrail:", error)- message.error("Failed to delete guardrail")+ NotificationManager.fromBackend("Failed to delete guardrail")} finally {setIsDeleting(false)setGuardrailToDelete(null)diff --git a/ui/litellm-dashboard/src/components/guardrails/add_guardrail_form.tsx b/ui/litellm-dashboard/src/components/guardrails/add_guardrail_form.tsxindex bce9db2e453..41a07099df0 100644--- a/ui/litellm-dashboard/src/components/guardrails/add_guardrail_form.tsx+++ b/ui/litellm-dashboard/src/components/guardrails/add_guardrail_form.tsx@@ -7,6 +7,7 @@ import { createGuardrailCall, getGuardrailUISettings, getGuardrailProviderSpecifimport PiiConfiguration from './pii_configuration';import GuardrailProviderFields from './guardrail_provider_fields';import GuardrailOptionalParams from './guardrail_optional_params';+import NotificationManager from '../molecules/notifications_manager';const { Title, Text, Link } = Typography;const { Option } = Select;@@ -103,7 +104,7 @@ const AddGuardrailForm: React.FC<AddGuardrailFormProps> = ({populateGuardrailProviderMap(providerParamsResp);} catch (error) {console.error('Error fetching guardrail data:', error);- message.error('Failed to load guardrail configuration');+ NotificationManager.fromBackend('Failed to load guardrail configuration');}};@@ -186,7 +187,7 @@ const AddGuardrailForm: React.FC<AddGuardrailFormProps> = ({// Validate configuration stepsif (currentStep === 1) {if (shouldRenderPIIConfigSettings(selectedProvider) && selectedEntities.length === 0) {- message.error('Please select at least one PII entity to continue');+ NotificationManager.fromBackend('Please select at least one PII entity to continue');return;}}@@ -274,7 +275,7 @@ const AddGuardrailForm: React.FC<AddGuardrailFormProps> = ({// For some guardrails, the config values need to be in litellm_paramsguardrailData.guardrail_info = configObj;} catch (error) {- message.error('Invalid JSON in configuration');+ NotificationManager.fromBackend('Invalid JSON in configuration');setLoading(false);return;}@@ -345,7 +346,7 @@ const AddGuardrailForm: React.FC<AddGuardrailFormProps> = ({onClose();} catch (error) {console.error("Failed to create guardrail:", error);- message.error('Failed to create guardrail: ' + (error instanceof Error ? error.message : String(error)));+ NotificationManager.fromBackend('Failed to create guardrail: ' + (error instanceof Error ? error.message : String(error)));} finally {setLoading(false);}diff --git a/ui/litellm-dashboard/src/components/guardrails/edit_guardrail_form.tsx b/ui/litellm-dashboard/src/components/guardrails/edit_guardrail_form.tsxindex c64a7eac542..9a5a30b45af 100644--- a/ui/litellm-dashboard/src/components/guardrails/edit_guardrail_form.tsx+++ b/ui/litellm-dashboard/src/components/guardrails/edit_guardrail_form.tsx@@ -4,6 +4,7 @@ import { Button, TextInput } from '@tremor/react';import { GuardrailProviders, guardrail_provider_map, guardrailLogoMap, getGuardrailProviders } from './guardrail_info_helpers';import { getGuardrailUISettings } from '../networking';import PiiConfiguration from './pii_configuration';+import NotificationManager from '../molecules/notifications_manager';const { Title, Text } = Typography;const { Option } = Select;@@ -59,7 +60,7 @@ const EditGuardrailForm: React.FC<EditGuardrailFormProps> = ({setGuardrailSettings(data);} catch (error) {console.error('Error fetching guardrail settings:', error);- message.error('Failed to load guardrail settings');+ NotificationManager.fromBackend('Failed to load guardrail settings');}};@@ -165,7 +166,7 @@ const EditGuardrailForm: React.FC<EditGuardrailFormProps> = ({guardrailData.guardrail.guardrail_info = configObj;}} catch (error) {- message.error('Invalid JSON in configuration');+ NotificationManager.fromBackend('Invalid JSON in configuration');setLoading(false);return;}@@ -200,7 +201,7 @@ const EditGuardrailForm: React.FC<EditGuardrailFormProps> = ({onClose();} catch (error) {console.error("Failed to update guardrail:", error);- message.error('Failed to update guardrail: ' + (error instanceof Error ? error.message : String(error)));+ NotificationManager.fromBackend('Failed to update guardrail: ' + (error instanceof Error ? error.message : String(error)));} finally {setLoading(false);}diff --git a/ui/litellm-dashboard/src/components/guardrails/guardrail_info.tsx b/ui/litellm-dashboard/src/components/guardrails/guardrail_info.tsxindex ec02c412dcd..8c78bb045cf 100644--- a/ui/litellm-dashboard/src/components/guardrails/guardrail_info.tsx+++ b/ui/litellm-dashboard/src/components/guardrails/guardrail_info.tsx@@ -28,6 +28,7 @@ import GuardrailOptionalParams from "./guardrail_optional_params"import { ArrowLeftIcon } from "@heroicons/react/outline"import { copyToClipboard as utilCopyToClipboard } from "@/utils/dataUtils"import { CheckIcon, CopyIcon } from "lucide-react"+import NotificationManager from "../molecules/notifications_manager"export interface GuardrailInfoProps {guardrailId: string@@ -104,7 +105,7 @@ const GuardrailInfoView: React.FC<GuardrailInfoProps> = ({ guardrailId, onClose,setSelectedPiiActions({})}} catch (error) {- message.error("Failed to load guardrail information")+ NotificationManager.fromBackend("Failed to load guardrail information")console.error("Error fetching guardrail info:", error)} finally {setLoading(false)@@ -296,7 +297,7 @@ const GuardrailInfoView: React.FC<GuardrailInfoProps> = ({ guardrailId, onClose,setIsEditing(false)} catch (error) {console.error("Error updating guardrail:", error)- message.error("Failed to update guardrail")+ NotificationManager.fromBackend("Failed to update guardrail")}}diff --git a/ui/litellm-dashboard/src/components/make_model_public_form.tsx b/ui/litellm-dashboard/src/components/make_model_public_form.tsxindex b8a0735a1f4..8a67116846f 100644--- a/ui/litellm-dashboard/src/components/make_model_public_form.tsx+++ b/ui/litellm-dashboard/src/components/make_model_public_form.tsx@@ -3,6 +3,7 @@ import { Modal, Form, Steps, Button, message, Checkbox } from "antd";import { Text, Title, Badge } from "@tremor/react";import { makeModelGroupPublic } from "./networking";import ModelFilters from "./model_filters";+import NotificationManager from "./molecules/notifications_manager";const { Step } = Steps;@@ -56,7 +57,7 @@ const MakeModelPublicForm: React.FC<MakeModelPublicFormProps> = ({const handleNext = () => {if (currentStep === 0) {if (selectedModels.size === 0) {- message.error("Please select at least one model to make public");+ NotificationManager.fromBackend("Please select at least one model to make public");return;}setCurrentStep(1);@@ -109,7 +110,7 @@ const MakeModelPublicForm: React.FC<MakeModelPublicFormProps> = ({const handleSubmit = async () => {if (selectedModels.size === 0) {- message.error("Please select at least one model to make public");+ NotificationManager.fromBackend("Please select at least one model to make public");return;}@@ -123,7 +124,7 @@ const MakeModelPublicForm: React.FC<MakeModelPublicFormProps> = ({onSuccess();} catch (error) {console.error("Error making model groups public:", error);- message.error("Failed to make model groups public. Please try again.");+ NotificationManager.fromBackend("Failed to make model groups public. Please try again.");} finally {setLoading(false);}diff --git a/ui/litellm-dashboard/src/components/mcp_tools/ToolTestPanel.tsx b/ui/litellm-dashboard/src/components/mcp_tools/ToolTestPanel.tsxindex 4727d3713b1..54bd2f8e548 100644--- a/ui/litellm-dashboard/src/components/mcp_tools/ToolTestPanel.tsx+++ b/ui/litellm-dashboard/src/components/mcp_tools/ToolTestPanel.tsx@@ -3,7 +3,7 @@ import { Button, Callout, TextInput } from "@tremor/react";import { MCPTool, InputSchema } from "./types";import { Form, Tooltip, message } from "antd";import { InfoCircleOutlined, ClockCircleOutlined } from "@ant-design/icons";-+import NotificationManager from "../molecules/notifications_manager";export function ToolTestPanel({tool,@@ -145,7 +145,7 @@ export function ToolTestPanel({if (success) {message.success('Result copied to clipboard');} else {- message.error('Failed to copy result');+ NotificationManager.fromBackend('Failed to copy result');}};@@ -154,7 +154,7 @@ export function ToolTestPanel({if (success) {message.success('Tool name copied to clipboard');} else {- message.error('Failed to copy tool name');+ NotificationManager.fromBackend('Failed to copy tool name');}};diff --git a/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx b/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsxindex 7d0d36347f3..12d8b67ff99 100644--- a/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx+++ b/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx@@ -9,6 +9,7 @@ import MCPConnectionStatus from "./mcp_connection_status"import StdioConfiguration from "./StdioConfiguration"import { isAdminRole } from "@/utils/roles"import { validateMCPServerUrl, validateMCPServerName } from "./utils"+import NotificationManager from "../molecules/notifications_manager"const asset_logos_folder = "../ui/assets/logos/"export const mcpLogoImg = `${asset_logos_folder}mcp_logo.png`@@ -80,7 +81,7 @@ const CreateMCPServer: React.FC<CreateMCPServerProps> = ({console.log("Parsed stdio config:", stdioFields)} catch (error) {- message.error("Invalid JSON in stdio configuration")+ NotificationManager.fromBackend("Invalid JSON in stdio configuration")return}}@@ -113,7 +114,7 @@ const CreateMCPServer: React.FC<CreateMCPServerProps> = ({onCreateSuccess(response)}} catch (error) {- message.error("Error creating MCP Server: " + error, 20)+ NotificationManager.fromBackend("Error creating MCP Server: " + error)} finally {setIsLoading(false)}diff --git a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsxindex 37a766c2cfc..52cb09a9d80 100644--- a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx+++ b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx@@ -6,6 +6,7 @@ import { updateMCPServer, testMCPToolsListRequest } from "../networking";import MCPServerCostConfig from "./mcp_server_cost_config";import { MinusCircleOutlined, PlusOutlined, InfoCircleOutlined } from "@ant-design/icons";import { validateMCPServerUrl, validateMCPServerName } from "./utils";+import NotificationManager from "../molecules/notifications_manager";interface MCPServerEditProps {mcpServer: MCPServer;@@ -131,7 +132,7 @@ const MCPServerEdit: React.FC<MCPServerEditProps> = ({ mcpServer, accessToken, omessage.success("MCP Server updated successfully");onSuccess(updated);} catch (error: any) {- message.error("Failed to update MCP Server" + (error?.message ? `: ${error.message}` : ""));+ NotificationManager.fromBackend("Failed to update MCP Server" + (error?.message ? `: ${error.message}` : ""));}};diff --git a/ui/litellm-dashboard/src/components/mcp_tools/mcp_tools.tsx b/ui/litellm-dashboard/src/components/mcp_tools/mcp_tools.tsxindex b2ba26875fb..a8682467a44 100644--- a/ui/litellm-dashboard/src/components/mcp_tools/mcp_tools.tsx+++ b/ui/litellm-dashboard/src/components/mcp_tools/mcp_tools.tsx@@ -20,6 +20,7 @@ import { Button, Card, Title, Text } from "@tremor/react";import { RobotOutlined, ApiOutlined, KeyOutlined, SafetyOutlined, ToolOutlined } from "@ant-design/icons";import { AUTH_TYPE } from "./types";+import NotificationManager from "../molecules/notifications_manager";type AuthModalProps = {visible: boolean;diff --git a/ui/litellm-dashboard/src/components/model_dashboard.tsx b/ui/litellm-dashboard/src/components/model_dashboard.tsxindex cd4fd66e583..c9143d1fbfa 100644--- a/ui/litellm-dashboard/src/components/model_dashboard.tsx+++ b/ui/litellm-dashboard/src/components/model_dashboard.tsx@@ -77,6 +77,7 @@ import PassThroughSettings from "./pass_through_settings";import ModelGroupAliasSettings from "./model_group_alias_settings";import { all_admin_roles } from "@/utils/roles";import { Table as TableInstance } from "@tanstack/react-table";+import NotificationManager from "./molecules/notifications_manager";interface ModelDashboardProps {accessToken: string | null;@@ -439,7 +440,7 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({if (info.file.status === "done") {message.success(`${info.file.name} file uploaded successfully`);} else if (info.file.status === "error") {- message.error(`${info.file.name} file upload failed.`);+ NotificationManager.fromBackend(`${info.file.name} file upload failed.`);}},};@@ -480,7 +481,7 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({await setCallbacksCall(accessToken, payload);} catch (error) {console.error("Failed to save retry settings:", error);- message.error("Failed to save retry settings");+ NotificationManager.fromBackend("Failed to save retry settings");}};@@ -1003,7 +1004,7 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({const errorMessages = error.errorFields?.map((field: any) => {return `${field.name.join('.')}: ${field.errors.join(', ')}`;}).join(' | ') || 'Unknown validation error';- message.error(`Please fill in the following required fields: ${errorMessages}`);+ NotificationManager.fromBackend(`Please fill in the following required fields: ${errorMessages}`);});};diff --git a/ui/litellm-dashboard/src/components/model_group_alias_settings.tsx b/ui/litellm-dashboard/src/components/model_group_alias_settings.tsxindex d9a83e0a520..d035d45a06b 100644--- a/ui/litellm-dashboard/src/components/model_group_alias_settings.tsx+++ b/ui/litellm-dashboard/src/components/model_group_alias_settings.tsx@@ -13,6 +13,7 @@ import {TableRow,TableCell} from "@tremor/react";+import NotificationManager from "./molecules/notifications_manager";interface ModelGroupAliasSettingsProps {accessToken: string;@@ -75,20 +76,20 @@ const ModelGroupAliasSettings: React.FC<ModelGroupAliasSettingsProps> = ({return true;} catch (error) {console.error("Failed to save model group alias settings:", error);- message.error("Failed to save model group alias settings");+ NotificationManager.fromBackend("Failed to save model group alias settings");return false;}};const handleAddAlias = async () => {if (!newAlias.aliasName || !newAlias.targetModelGroup) {- message.error("Please provide both alias name and target model group");+ NotificationManager.fromBackend("Please provide both alias name and target model group");return;}// Check for duplicate alias namesif (aliases.some(alias => alias.aliasName === newAlias.aliasName)) {- message.error("An alias with this name already exists");+ NotificationManager.fromBackend("An alias with this name already exists");return;}@@ -115,13 +116,13 @@ const ModelGroupAliasSettings: React.FC<ModelGroupAliasSettingsProps> = ({if (!editingAlias) return;if (!editingAlias.aliasName || !editingAlias.targetModelGroup) {- message.error("Please provide both alias name and target model group");+ NotificationManager.fromBackend("Please provide both alias name and target model group");return;}// Check for duplicate alias names (excluding current alias)if (aliases.some(alias => alias.id !== editingAlias.id && alias.aliasName === editingAlias.aliasName)) {- message.error("An alias with this name already exists");+ NotificationManager.fromBackend("An alias with this name already exists");return;}diff --git a/ui/litellm-dashboard/src/components/model_info_view.tsx b/ui/litellm-dashboard/src/components/model_info_view.tsxindex 60d69687102..115be00779b 100644--- a/ui/litellm-dashboard/src/components/model_info_view.tsx+++ b/ui/litellm-dashboard/src/components/model_info_view.tsx@@ -38,6 +38,7 @@ import CacheControlSettings from "./add_model/cache_control_settings";import { CheckIcon, CopyIcon } from "lucide-react";import { copyToClipboard as utilCopyToClipboard } from "../utils/dataUtils";import EditAutoRouterModal from "./edit_auto_router/edit_auto_router_modal";+import NotificationManager from "./molecules/notifications_manager";interface ModelInfoViewProps {modelId: string;@@ -211,7 +212,7 @@ export default function ModelInfoView({};}} catch (e) {- message.error("Invalid JSON in Model Info");+ NotificationManager.fromBackend("Invalid JSON in Model Info");return;}@@ -242,7 +243,7 @@ export default function ModelInfoView({setIsEditing(false);} catch (error) {console.error("Error updating model:", error);- message.error("Failed to update model settings");+ NotificationManager.fromBackend("Failed to update model settings");} finally {setIsSaving(false);}@@ -280,7 +281,7 @@ export default function ModelInfoView({onClose();} catch (error) {console.error("Error deleting the model:", error);- message.error("Failed to delete model");+ NotificationManager.fromBackend("Failed to delete model");}};diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsxindex 81829eef7cc..96d879295a2 100644--- a/ui/litellm-dashboard/src/components/networking.tsx+++ b/ui/litellm-dashboard/src/components/networking.tsx@@ -25,6 +25,7 @@ import {EmailEventSettingsUpdateRequest,} from "./email_events/types";import { jsonFields } from "./common_components/check_openapi_schema"+import NotificationManager from "./molecules/notifications_manager";const isLocal = process.env.NODE_ENV === "development";export const defaultProxyBaseUrl = isLocal ? "http://localhost:4000" : null;@@ -3198,7 +3199,7 @@ export const keyInfoV1Call = async (accessToken: string, key: string) => {if (!response.ok) {const errorData = await response.text();handleError(errorData);- message.error("Failed to fetch key info - " + errorData);+ NotificationManager.fromBackend("Failed to fetch key info - " + errorData);}const data = await response.json();@@ -3853,7 +3854,7 @@ export const teamUpdateCall = async (const errorData = await response.text();handleError(errorData);console.error("Error response from the server:", errorData);- message.error("Failed to update team settings: " + errorData);+ NotificationManager.fromBackend("Failed to update team settings: " + errorData);throw new Error(errorData);}const data = (await response.json()) as { data: Team; team_id: string };diff --git a/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx b/ui/litellm-dashboard/src/components/organisms/create_key_button.tsxindex 7209e96f6a2..3a220014dd4 100644--- a/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx+++ b/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx@@ -33,6 +33,7 @@ import { formatNumberWithCommas } from "@/utils/dataUtils"import { callback_map, mapDisplayToInternalNames } from "../callback_info_helpers"import MCPServerSelector from "../mcp_server_management/MCPServerSelector"import ModelAliasManager from "../common_components/ModelAliasManager"+import NotificationManager from "../molecules/notifications_manager"const { Option } = Select;@@ -384,7 +385,7 @@ const CreateKey: React.FC<CreateKeyProps> = ({} catch (error) {console.log("error in create key:", error);- message.error(`Error creating the key: ${error}`);+ NotificationManager.fromBackend(`Error creating the key: ${error}`);}};@@ -434,7 +435,7 @@ const CreateKey: React.FC<CreateKeyProps> = ({setUserOptions(options);} catch (error) {console.error('Error fetching users:', error);- message.error('Failed to search for users');+ NotificationManager.fromBackend('Failed to search for users');} finally {setUserSearchLoading(false);}diff --git a/ui/litellm-dashboard/src/components/organization/organization_view.tsx b/ui/litellm-dashboard/src/components/organization/organization_view.tsxindex c0eb59ff316..55e8b5308bb 100644--- a/ui/litellm-dashboard/src/components/organization/organization_view.tsx+++ b/ui/litellm-dashboard/src/components/organization/organization_view.tsx@@ -41,6 +41,7 @@ import VectorStoreSelector from "../vector_store_management/VectorStoreSelector"import MCPServerSelector from "../mcp_server_management/MCPServerSelector"import { copyToClipboard as utilCopyToClipboard, formatNumberWithCommas } from "@/utils/dataUtils"import { CheckIcon, CopyIcon } from "lucide-react"+import NotificationManager from "../molecules/notifications_manager"interface OrganizationInfoProps {organizationId: string@@ -78,7 +79,7 @@ const OrganizationInfoView: React.FC<OrganizationInfoProps> = ({const response = await organizationInfoCall(accessToken, organizationId)setOrgData(response)} catch (error) {- message.error("Failed to load organization information")+ NotificationManager.fromBackend("Failed to load organization information")console.error("Error fetching organization info:", error)} finally {setLoading(false)@@ -107,7 +108,7 @@ const OrganizationInfoView: React.FC<OrganizationInfoProps> = ({form.resetFields()fetchOrgInfo()} catch (error) {- message.error("Failed to add organization member")+ NotificationManager.fromBackend("Failed to add organization member")console.error("Error adding organization member:", error)}}@@ -128,7 +129,7 @@ const OrganizationInfoView: React.FC<OrganizationInfoProps> = ({form.resetFields()fetchOrgInfo()} catch (error) {- message.error("Failed to update organization member")+ NotificationManager.fromBackend("Failed to update organization member")console.error("Error updating organization member:", error)}}@@ -143,7 +144,7 @@ const OrganizationInfoView: React.FC<OrganizationInfoProps> = ({form.resetFields()fetchOrgInfo()} catch (error) {- message.error("Failed to delete organization member")+ NotificationManager.fromBackend("Failed to delete organization member")console.error("Error deleting organization member:", error)}}@@ -192,7 +193,7 @@ const OrganizationInfoView: React.FC<OrganizationInfoProps> = ({setIsEditing(false)fetchOrgInfo()} catch (error) {- message.error("Failed to update organization settings")+ NotificationManager.fromBackend("Failed to update organization settings")console.error("Error updating organization:", error)}}diff --git a/ui/litellm-dashboard/src/components/pass_through_info.tsx b/ui/litellm-dashboard/src/components/pass_through_info.tsxindex 527fba2dbfc..c3902ad8ccb 100644--- a/ui/litellm-dashboard/src/components/pass_through_info.tsx+++ b/ui/litellm-dashboard/src/components/pass_through_info.tsx@@ -20,6 +20,7 @@ import {} from "./networking";import { Eye, EyeOff } from "lucide-react";import RoutePreview from "./route_preview";+import NotificationManager from "./molecules/notifications_manager";export interface PassThroughInfoProps {endpointData: PassThroughEndpoint;@@ -87,7 +88,7 @@ const PassThroughInfoView: React.FC<PassThroughInfoProps> = ({? JSON.parse(values.headers): values.headers;} catch (e) {- message.error("Invalid JSON format for headers");+ NotificationManager.fromBackend("Invalid JSON format for headers");return;}}@@ -114,7 +115,7 @@ const PassThroughInfoView: React.FC<PassThroughInfoProps> = ({}} catch (error) {console.error("Error updating endpoint:", error);- message.error("Failed to update pass through endpoint");+ NotificationManager.fromBackend("Failed to update pass through endpoint");}};@@ -130,7 +131,7 @@ const PassThroughInfoView: React.FC<PassThroughInfoProps> = ({}} catch (error) {console.error("Error deleting endpoint:", error);- message.error("Failed to delete pass through endpoint");+ NotificationManager.fromBackend("Failed to delete pass through endpoint");}};diff --git a/ui/litellm-dashboard/src/components/pass_through_settings.tsx b/ui/litellm-dashboard/src/components/pass_through_settings.tsxindex 6faea635517..4059c6ac527 100644--- a/ui/litellm-dashboard/src/components/pass_through_settings.tsx+++ b/ui/litellm-dashboard/src/components/pass_through_settings.tsx@@ -45,6 +45,7 @@ import PassThroughInfoView from "./pass_through_info";import { DataTable } from "./view_logs/table";import { ColumnDef } from "@tanstack/react-table";import { Eye, EyeOff } from "lucide-react";+import NotificationManager from "./molecules/notifications_manager";interface GeneralSettingsPageProps {accessToken: string | null;@@ -153,7 +154,7 @@ const PassThroughSettings: React.FC<GeneralSettingsPageProps> = ({message.success("Endpoint deleted successfully.");} catch (error) {console.error("Error deleting the endpoint:", error);- message.error("Error deleting the endpoint: " + error);+ NotificationManager.fromBackend("Error deleting the endpoint: " + error);}// Close the confirmation modal and reset the endpointToDeletediff --git a/ui/litellm-dashboard/src/components/price_data_reload.tsx b/ui/litellm-dashboard/src/components/price_data_reload.tsxindex 05d3a2e102c..4961d10db4d 100644--- a/ui/litellm-dashboard/src/components/price_data_reload.tsx+++ b/ui/litellm-dashboard/src/components/price_data_reload.tsx@@ -2,6 +2,7 @@ import React, { useState, useEffect } from "react";import { Button, Popconfirm, message, Modal, InputNumber, Space, Typography, Tag, Card } from "antd";import { ReloadOutlined, ClockCircleOutlined, StopOutlined } from "@ant-design/icons";import { reloadModelCostMap, scheduleModelCostMapReload, cancelModelCostMapReload, getModelCostMapReloadStatus } from "./networking";+import NotificationManager from "./molecules/notifications_manager";const { Text } = Typography;@@ -77,7 +78,7 @@ const PriceDataReload: React.FC<PriceDataReloadProps> = ({const handleHardRefresh = async () => {if (!accessToken) {- message.error("No access token available");+ NotificationManager.fromBackend("No access token available");return;}@@ -93,23 +94,23 @@ const PriceDataReload: React.FC<PriceDataReloadProps> = ({// Refresh status after successful reloadawait fetchReloadStatus();} else {- message.error("Failed to reload price data");+ NotificationManager.fromBackend("Failed to reload price data");}} catch (error) {console.error("Error reloading price data:", error);- message.error("Failed to reload price data. Please try again.");+ NotificationManager.fromBackend("Failed to reload price data. Please try again.");} finally {setIsLoading(false);}};const handleScheduleReload = async () => {if (!accessToken) {- message.error("No access token available");+ NotificationManager.fromBackend("No access token available");return;}if (hours <= 0) {- message.error("Hours must be greater than 0");+ NotificationManager.fromBackend("Hours must be greater than 0");return;}@@ -122,11 +123,11 @@ const PriceDataReload: React.FC<PriceDataReloadProps> = ({setShowScheduleModal(false);await fetchReloadStatus();} else {- message.error("Failed to schedule periodic reload");+ NotificationManager.fromBackend("Failed to schedule periodic reload");}} catch (error) {console.error("Error scheduling reload:", error);- message.error("Failed to schedule periodic reload. Please try again.");+ NotificationManager.fromBackend("Failed to schedule periodic reload. Please try again.");} finally {setIsScheduling(false);}@@ -134,7 +135,7 @@ const PriceDataReload: React.FC<PriceDataReloadProps> = ({const handleCancelReload = async () => {if (!accessToken) {- message.error("No access token available");+ NotificationManager.fromBackend("No access token available");return;}@@ -146,11 +147,11 @@ const PriceDataReload: React.FC<PriceDataReloadProps> = ({message.success("Periodic reload cancelled successfully");await fetchReloadStatus();} else {- message.error("Failed to cancel periodic reload");+ NotificationManager.fromBackend("Failed to cancel periodic reload");}} catch (error) {console.error("Error cancelling reload:", error);- message.error("Failed to cancel periodic reload. Please try again.");+ NotificationManager.fromBackend("Failed to cancel periodic reload. Please try again.");} finally {setIsCancelling(false);}diff --git a/ui/litellm-dashboard/src/components/prompts.tsx b/ui/litellm-dashboard/src/components/prompts.tsxindex 477a7c93e6d..b272a4f14c5 100644--- a/ui/litellm-dashboard/src/components/prompts.tsx+++ b/ui/litellm-dashboard/src/components/prompts.tsx@@ -6,7 +6,7 @@ import { getPromptsList, PromptSpec, ListPromptsResponse, deletePromptCall } froimport PromptTable from "./prompts/prompt_table"import PromptInfoView from "./prompts/prompt_info"import AddPromptForm from "./prompts/add_prompt_form"-+import NotificationManager from "./molecules/notifications_manager"import { isAdminRole } from "@/utils/roles"interface PromptsProps {@@ -78,7 +78,7 @@ const PromptsPanel: React.FC<PromptsProps> = ({ accessToken, userRole }) => {fetchPrompts() // Refresh the list} catch (error) {console.error("Error deleting prompt:", error)- message.error("Failed to delete prompt")+ NotificationManager.fromBackend("Failed to delete prompt")} finally {setIsDeleting(false)setPromptToDelete(null)diff --git a/ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsx b/ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsxindex a9dd143fee4..4c18fcaa0b6 100644--- a/ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsx+++ b/ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsx@@ -4,6 +4,7 @@ import { TextInput } from "@tremor/react"import { UploadOutlined } from "@ant-design/icons"import type { UploadFile, UploadProps } from "antd"import { convertPromptFileToJson, createPromptCall } from "../networking"+import NotificationManager from "../molecules/notifications_manager"const { Option } = Select@@ -44,12 +45,12 @@ const AddPromptForm: React.FC<AddPromptFormProps> = ({console.log("values: ", values)if (!accessToken) {- message.error("Access token is required")+ NotificationManager.fromBackend("Access token is required")return}if (promptIntegration === "dotprompt" && fileList.length === 0) {- message.error("Please upload a .prompt file")+ NotificationManager.fromBackend("Please upload a .prompt file")return}@@ -79,7 +80,7 @@ const AddPromptForm: React.FC<AddPromptFormProps> = ({}} catch (conversionError) {console.error("Error converting prompt file:", conversionError)- message.error("Failed to convert prompt file to JSON")+ NotificationManager.fromBackend("Failed to convert prompt file to JSON")setLoading(false)return}@@ -93,7 +94,7 @@ const AddPromptForm: React.FC<AddPromptFormProps> = ({onSuccess()} catch (createError) {console.error("Error creating prompt:", createError)- message.error("Failed to create prompt")+ NotificationManager.fromBackend("Failed to create prompt")}} catch (error) {@@ -106,7 +107,7 @@ const AddPromptForm: React.FC<AddPromptFormProps> = ({const uploadProps: UploadProps = {beforeUpload: (file) => {if (!file.name.endsWith('.prompt')) {- message.error('Please upload a .prompt file')+ NotificationManager.fromBackend('Please upload a .prompt file')return false}return false // Prevent automatic uploaddiff --git a/ui/litellm-dashboard/src/components/prompts/prompt_info.tsx b/ui/litellm-dashboard/src/components/prompts/prompt_info.tsxindex 07587891610..98cca56375f 100644--- a/ui/litellm-dashboard/src/components/prompts/prompt_info.tsx+++ b/ui/litellm-dashboard/src/components/prompts/prompt_info.tsx@@ -17,6 +17,7 @@ import { ArrowLeftIcon, TrashIcon } from "@heroicons/react/outline"import { getPromptInfo, PromptInfoResponse, PromptSpec, PromptTemplateBase, deletePromptCall } from "@/components/networking"import { copyToClipboard as utilCopyToClipboard } from "@/utils/dataUtils"import { CheckIcon, CopyIcon } from "lucide-react"+import NotificationManager from "../molecules/notifications_manager"export interface PromptInfoProps {promptId: string@@ -44,7 +45,7 @@ const PromptInfoView: React.FC<PromptInfoProps> = ({ promptId, onClose, accessTosetPromptTemplate(response.raw_prompt_template)setRawApiResponse(response) // Store the raw response for the Raw JSON tab} catch (error) {- message.error("Failed to load prompt information")+ NotificationManager.fromBackend("Failed to load prompt information")console.error("Error fetching prompt info:", error)} finally {setLoading(false)@@ -95,7 +96,7 @@ const PromptInfoView: React.FC<PromptInfoProps> = ({ promptId, onClose, accessToonClose() // Close the info view} catch (error) {console.error("Error deleting prompt:", error)- message.error("Failed to delete prompt")+ NotificationManager.fromBackend("Failed to delete prompt")} finally {setIsDeleting(false)setShowDeleteConfirm(false)diff --git a/ui/litellm-dashboard/src/components/provider_info_helpers.tsx b/ui/litellm-dashboard/src/components/provider_info_helpers.tsxindex 1d42ac0974c..82366428f43 100644--- a/ui/litellm-dashboard/src/components/provider_info_helpers.tsx+++ b/ui/litellm-dashboard/src/components/provider_info_helpers.tsx@@ -1,5 +1,6 @@import OpenAI from "openai";import React from "react";+import NotificationManager from "./molecules/notifications_manager";export enum Providers {Bedrock = "Amazon Bedrock",diff --git a/ui/litellm-dashboard/src/components/tag_management/index.tsx b/ui/litellm-dashboard/src/components/tag_management/index.tsxindex 22e87b20850..2799937ecd3 100644--- a/ui/litellm-dashboard/src/components/tag_management/index.tsx+++ b/ui/litellm-dashboard/src/components/tag_management/index.tsx@@ -27,6 +27,7 @@ import { modelInfoCall } from "../networking";import { tagCreateCall, tagListCall, tagDeleteCall } from "../networking";import { Tag } from "./types";import TagTable from "./TagTable";+import NotificationManager from "../molecules/notifications_manager";interface ModelInfo {model_name: string;@@ -67,7 +68,7 @@ const TagManagement: React.FC<TagProps> = ({setTags(Object.values(response));} catch (error) {console.error("Error fetching tags:", error);- message.error("Error fetching tags: " + error);+ NotificationManager.fromBackend("Error fetching tags: " + error);}};@@ -91,7 +92,7 @@ const TagManagement: React.FC<TagProps> = ({fetchTags();} catch (error) {console.error("Error creating tag:", error);- message.error("Error creating tag: " + error);+ NotificationManager.fromBackend("Error creating tag: " + error);}};@@ -108,7 +109,7 @@ const TagManagement: React.FC<TagProps> = ({fetchTags();} catch (error) {console.error("Error deleting tag:", error);- message.error("Error deleting tag: " + error);+ NotificationManager.fromBackend("Error deleting tag: " + error);}setIsDeleteModalOpen(false);setTagToDelete(null);@@ -124,7 +125,7 @@ const TagManagement: React.FC<TagProps> = ({}} catch (error) {console.error("Error fetching models:", error);- message.error("Error fetching models: " + error);+ NotificationManager.fromBackend("Error fetching models: " + error);}};fetchModels();diff --git a/ui/litellm-dashboard/src/components/tag_management/tag_info.tsx b/ui/litellm-dashboard/src/components/tag_management/tag_info.tsxindex a727ff72695..17bba32350f 100644--- a/ui/litellm-dashboard/src/components/tag_management/tag_info.tsx+++ b/ui/litellm-dashboard/src/components/tag_management/tag_info.tsx@@ -6,6 +6,7 @@ import { fetchUserModels } from "../organisms/create_key_button"import { getModelDisplayName } from "../key_team_helpers/fetch_available_models_team_key"import { tagInfoCall, tagUpdateCall } from "../networking"import { Tag, TagInfoResponse } from "./types"+import NotificationManager from "../molecules/notifications_manager";interface TagInfoViewProps {tagId: string@@ -38,7 +39,7 @@ const TagInfoView: React.FC<TagInfoViewProps> = ({ tagId, onClose, accessToken,}} catch (error) {console.error("Error fetching tag details:", error)- message.error("Error fetching tag details: " + error)+ NotificationManager.fromBackend("Error fetching tag details: " + error)}}@@ -67,7 +68,7 @@ const TagInfoView: React.FC<TagInfoViewProps> = ({ tagId, onClose, accessToken,fetchTagDetails()} catch (error) {console.error("Error updating tag:", error)- message.error("Error updating tag: " + error)+ NotificationManager.fromBackend("Error updating tag: " + error)}}diff --git a/ui/litellm-dashboard/src/components/team/available_teams.tsx b/ui/litellm-dashboard/src/components/team/available_teams.tsxindex 2959925f424..cda2a4f458e 100644--- a/ui/litellm-dashboard/src/components/team/available_teams.tsx+++ b/ui/litellm-dashboard/src/components/team/available_teams.tsx@@ -13,6 +13,7 @@ import {} from "@tremor/react";import { message } from 'antd';import { availableTeamListCall, teamMemberAddCall } from "../networking";+import NotificationManager from "../molecules/notifications_manager";interface AvailableTeam {team_id: string;@@ -64,7 +65,7 @@ const AvailableTeamsPanel: React.FC<AvailableTeamsProps> = ({setAvailableTeams(teams => teams.filter(team => team.team_id !== teamId));} catch (error) {console.error('Error joining team:', error);- message.error('Failed to join team');+ NotificationManager.fromBackend('Failed to join team');}};diff --git a/ui/litellm-dashboard/src/components/team/edit_membership.tsx b/ui/litellm-dashboard/src/components/team/edit_membership.tsxindex 5ffc1dd5945..4a608772470 100644--- a/ui/litellm-dashboard/src/components/team/edit_membership.tsx+++ b/ui/litellm-dashboard/src/components/team/edit_membership.tsx@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react';import { Modal, Form, Input, Select as AntSelect, Button as AntButton, message } from 'antd';import { Select, SelectItem } from "@tremor/react";import { Card, Text } from "@tremor/react";+import NotificationManager from "../molecules/notifications_manager";interface BaseMember {user_email?: string;@@ -80,7 +81,7 @@ const MemberModal = <T extends BaseMember>({form.resetFields();// message.success(`Successfully ${mode === 'add' ? 'added' : 'updated'} member`);} catch (error) {- // message.error('Failed to submit form');+ // NotificationManager.fromBackend('Failed to submit form');console.error('Form submission error:', error);}};diff --git a/ui/litellm-dashboard/src/components/team/member_permissions.tsx b/ui/litellm-dashboard/src/components/team/member_permissions.tsxindex 30dc3176753..c7edf66a59e 100644--- a/ui/litellm-dashboard/src/components/team/member_permissions.tsx+++ b/ui/litellm-dashboard/src/components/team/member_permissions.tsx@@ -15,6 +15,7 @@ import { Button, message, Checkbox, Empty } from "antd"import { ReloadOutlined, SaveOutlined } from "@ant-design/icons"import { getTeamPermissionsCall, teamPermissionsUpdateCall } from "@/components/networking"import { getPermissionInfo } from "./permission_definitions"+import NotificationManager from "../molecules/notifications_manager";interface MemberPermissionsProps {teamId: string@@ -40,7 +41,7 @@ const MemberPermissions: React.FC<MemberPermissionsProps> = ({ teamId, accessToksetSelectedPermissions(teamPermissions)setHasChanges(false)} catch (error) {- message.error("Failed to load permissions")+ NotificationManager.fromBackend("Failed to load permissions")console.error("Error fetching permissions:", error)} finally {setLoading(false)@@ -67,7 +68,7 @@ const MemberPermissions: React.FC<MemberPermissionsProps> = ({ teamId, accessTokmessage.success("Permissions updated successfully")setHasChanges(false)} catch (error) {- message.error("Failed to update permissions")+ NotificationManager.fromBackend("Failed to update permissions")console.error("Error updating permissions:", error)} finally {setSaving(false)diff --git a/ui/litellm-dashboard/src/components/team/team_info.tsx b/ui/litellm-dashboard/src/components/team/team_info.tsxindex c21294c8822..664a2a0fed1 100644--- a/ui/litellm-dashboard/src/components/team/team_info.tsx+++ b/ui/litellm-dashboard/src/components/team/team_info.tsx@@ -54,6 +54,7 @@ import LoggingSettingsView from "../logging_settings_view";import { fetchMCPAccessGroups } from "../networking";import { CheckIcon, CopyIcon } from "lucide-react";import { copyToClipboard as utilCopyToClipboard } from "../../utils/dataUtils"+import NotificationManager from "../molecules/notifications_manager";export interface TeamMembership {user_id: string;@@ -160,7 +161,7 @@ const TeamInfoView: React.FC<TeamInfoProps> = ({const response = await teamInfoCall(accessToken, teamId);setTeamData(response);} catch (error) {- message.error("Failed to load team information");+ NotificationManager.fromBackend("Failed to load team information");console.error("Error fetching team info:", error);} finally {setLoading(false);@@ -236,7 +237,7 @@ const TeamInfoView: React.FC<TeamInfoProps> = ({errMsg = error.message;}- message.error(errMsg);+ NotificationManager.fromBackend(errMsg);console.error("Error adding team member:", error);}};@@ -281,7 +282,7 @@ const TeamInfoView: React.FC<TeamInfoProps> = ({message.destroy(); // Remove all existing toasts- message.error(errMsg);+ NotificationManager.fromBackend(errMsg);console.error("Error updating team member:", error);}};@@ -303,7 +304,7 @@ const TeamInfoView: React.FC<TeamInfoProps> = ({// Notify parent component of the updateonUpdate(updatedTeamData);} catch (error) {- message.error("Failed to remove team member");+ NotificationManager.fromBackend("Failed to remove team member");console.error("Error removing team member:", error);}};@@ -316,7 +317,7 @@ const TeamInfoView: React.FC<TeamInfoProps> = ({try {parsedMetadata = values.metadata ? JSON.parse(values.metadata) : {};} catch (e) {- message.error("Invalid JSON in metadata field");+ NotificationManager.fromBackend("Invalid JSON in metadata field");return;}diff --git a/ui/litellm-dashboard/src/components/teams.tsx b/ui/litellm-dashboard/src/components/teams.tsxindex c9d74696a32..cc763341933 100644--- a/ui/litellm-dashboard/src/components/teams.tsx+++ b/ui/litellm-dashboard/src/components/teams.tsx@@ -464,7 +464,7 @@ const Teams: React.FC<TeamProps> = ({}} catch (error) {console.error("Error creating the team:", error);- message.error("Error creating the team: " + error, 20);+ NotificationManager.fromBackend("Error creating the team: " + error, 20);}};diff --git a/ui/litellm-dashboard/src/components/transform_request.tsx b/ui/litellm-dashboard/src/components/transform_request.tsxindex b55e562dff3..4507f27286d 100644--- a/ui/litellm-dashboard/src/components/transform_request.tsx+++ b/ui/litellm-dashboard/src/components/transform_request.tsx@@ -3,6 +3,7 @@ import { Button, Select, Tabs, message } from 'antd';import { CopyOutlined } from '@ant-design/icons';import { Title } from '@tremor/react';import { transformRequestCall } from './networking';+import NotificationManager from "./molecules/notifications_manager";interface TransformRequestPanelProps {accessToken: string | null;}@@ -67,7 +68,7 @@ ${formattedBody}try {requestBody = JSON.parse(originalRequestJSON);} catch (e) {- message.error('Invalid JSON in request body');+ NotificationManager.fromBackend('Invalid JSON in request body');setIsLoading(false);return;}@@ -80,7 +81,7 @@ ${formattedBody}// Make the API call using fetchif (!accessToken) {- message.error('No access token found');+ NotificationManager.fromBackend('No access token found');setIsLoading(false);return;}@@ -108,7 +109,7 @@ ${formattedBody}}} catch (err) {console.error('Error transforming request:', err);- message.error('Failed to transform request');+ NotificationManager.fromBackend('Failed to transform request');} finally {setIsLoading(false);}diff --git a/ui/litellm-dashboard/src/components/ui_theme_settings.tsx b/ui/litellm-dashboard/src/components/ui_theme_settings.tsxindex 8bdafe01483..bcc09a36baf 100644--- a/ui/litellm-dashboard/src/components/ui_theme_settings.tsx+++ b/ui/litellm-dashboard/src/components/ui_theme_settings.tsx@@ -9,6 +9,7 @@ import {import { message } from "antd"import { useTheme } from "@/contexts/ThemeContext"import { getProxyBaseUrl } from "@/components/networking"+import NotificationManager from "./molecules/notifications_manager";interface UIThemeSettingsProps {userID: string | null;@@ -79,7 +80,7 @@ const UIThemeSettings: React.FC<UIThemeSettingsProps> = ({}} catch (error) {console.error("Error updating logo settings:", error);- message.error("Failed to update logo settings");+ NotificationManager.fromBackend("Failed to update logo settings");} finally {setLoading(false);}@@ -112,7 +113,7 @@ const UIThemeSettings: React.FC<UIThemeSettingsProps> = ({}} catch (error) {console.error("Error resetting logo:", error);- message.error("Failed to reset logo");+ NotificationManager.fromBackend("Failed to reset logo");} finally {setLoading(false);}diff --git a/ui/litellm-dashboard/src/components/useful_links_management.tsx b/ui/litellm-dashboard/src/components/useful_links_management.tsxindex ec2fb616650..5e7e4d6facb 100644--- a/ui/litellm-dashboard/src/components/useful_links_management.tsx+++ b/ui/litellm-dashboard/src/components/useful_links_management.tsx@@ -14,6 +14,7 @@ import {TableRow,TableCell} from "@tremor/react";+import NotificationManager from "./molecules/notifications_manager";interface UsefulLinksManagementProps {accessToken: string | null;@@ -117,7 +118,7 @@ const UsefulLinksManagement: React.FC<UsefulLinksManagementProps> = ({return true;} catch (error) {console.error("Error saving links:", error);- message.error(`Failed to save links - ${error}`);+ NotificationManager.fromBackend(`Failed to save links - ${error}`);return false;}};@@ -129,13 +130,13 @@ const UsefulLinksManagement: React.FC<UsefulLinksManagementProps> = ({try {new URL(newLink.url);} catch {- message.error("Please enter a valid URL");+ NotificationManager.fromBackend("Please enter a valid URL");return;}// Check for duplicate display namesif (links.some(link => link.displayName === newLink.displayName)) {- message.error("A link with this display name already exists");+ NotificationManager.fromBackend("A link with this display name already exists");return;}@@ -165,13 +166,13 @@ const UsefulLinksManagement: React.FC<UsefulLinksManagementProps> = ({try {new URL(editingLink.url);} catch {- message.error("Please enter a valid URL");+ NotificationManager.fromBackend("Please enter a valid URL");return;}// Check for duplicate display names (excluding current link)if (links.some(link => link.id !== editingLink.id && link.displayName === editingLink.displayName)) {- message.error("A link with this display name already exists");+ NotificationManager.fromBackend("A link with this display name already exists");return;}diff --git a/ui/litellm-dashboard/src/components/vector_store_management/VectorStoreForm.tsx b/ui/litellm-dashboard/src/components/vector_store_management/VectorStoreForm.tsxindex 99acccf3d3b..bf0687c9e5d 100644--- a/ui/litellm-dashboard/src/components/vector_store_management/VectorStoreForm.tsx+++ b/ui/litellm-dashboard/src/components/vector_store_management/VectorStoreForm.tsx@@ -17,6 +17,7 @@ import {import { InfoCircleOutlined } from '@ant-design/icons';import { CredentialItem, vectorStoreCreateCall } from "../networking";import { VectorStoreProviders, vectorStoreProviderLogoMap, vectorStoreProviderMap, getProviderSpecificFields, VectorStoreFieldConfig } from "../vector_store_providers";+import NotificationManager from "../molecules/notifications_manager";interface VectorStoreFormProps {isVisible: boolean;@@ -45,7 +46,7 @@ const VectorStoreForm: React.FC<VectorStoreFormProps> = ({try {metadata = metadataJson.trim() ? JSON.parse(metadataJson) : {};} catch (e) {- message.error("Invalid JSON in metadata field");+ NotificationManager.fromBackend("Invalid JSON in metadata field");return;}@@ -75,7 +76,7 @@ const VectorStoreForm: React.FC<VectorStoreFormProps> = ({onSuccess();} catch (error) {console.error("Error creating vector store:", error);- message.error("Error creating vector store: " + error);+ NotificationManager.fromBackend("Error creating vector store: " + error);}};diff --git a/ui/litellm-dashboard/src/components/vector_store_management/VectorStoreTester.tsx b/ui/litellm-dashboard/src/components/vector_store_management/VectorStoreTester.tsxindex a70c0d6400a..b066cfc4eb1 100644--- a/ui/litellm-dashboard/src/components/vector_store_management/VectorStoreTester.tsx+++ b/ui/litellm-dashboard/src/components/vector_store_management/VectorStoreTester.tsx@@ -2,6 +2,7 @@ import React, { useState } from "react";import { Button, Input, Card, Typography, Spin, message, Divider } from "antd";import { SendOutlined, DatabaseOutlined, LoadingOutlined, DownOutlined, RightOutlined } from "@ant-design/icons";import { vectorStoreSearchCall } from "../networking";+import NotificationManager from "../molecules/notifications_manager";const { TextArea } = Input;const { Text, Title } = Typography;@@ -66,7 +67,7 @@ export const VectorStoreTester: React.FC<VectorStoreTesterProps> = ({setQuery("");} catch (error) {console.error("Error searching vector store:", error);- message.error("Failed to search vector store");+ NotificationManager.fromBackend("Failed to search vector store");} finally {setIsLoading(false);}diff --git a/ui/litellm-dashboard/src/components/vector_store_management/index.tsx b/ui/litellm-dashboard/src/components/vector_store_management/index.tsxindex f31f75758f5..18fa8c24bd6 100644--- a/ui/litellm-dashboard/src/components/vector_store_management/index.tsx+++ b/ui/litellm-dashboard/src/components/vector_store_management/index.tsx@@ -19,6 +19,7 @@ import VectorStoreForm from "./VectorStoreForm";import DeleteModal from "./DeleteModal";import VectorStoreInfoView from "./vector_store_info";import { isAdminRole } from "@/utils/roles";+import NotificationManager from "../molecules/notifications_manager";interface VectorStoreProps {accessToken: string | null;@@ -48,7 +49,7 @@ const VectorStoreManagement: React.FC<VectorStoreProps> = ({setVectorStores(response.data || []);} catch (error) {console.error("Error fetching vector stores:", error);- message.error("Error fetching vector stores: " + error);+ NotificationManager.fromBackend("Error fetching vector stores: " + error);}};@@ -60,7 +61,7 @@ const VectorStoreManagement: React.FC<VectorStoreProps> = ({setCredentials(response.credentials || []);} catch (error) {console.error("Error fetching credentials:", error);- message.error("Error fetching credentials: " + error);+ NotificationManager.fromBackend("Error fetching credentials: " + error);}};@@ -100,7 +101,7 @@ const VectorStoreManagement: React.FC<VectorStoreProps> = ({fetchVectorStores();} catch (error) {console.error("Error deleting vector store:", error);- message.error("Error deleting vector store: " + error);+ NotificationManager.fromBackend("Error deleting vector store: " + error);}setIsDeleteModalOpen(false);setVectorStoreToDelete(null);diff --git a/ui/litellm-dashboard/src/components/vector_store_management/vector_store_info.tsx b/ui/litellm-dashboard/src/components/vector_store_management/vector_store_info.tsxindex d5572078205..f7c34679b75 100644--- a/ui/litellm-dashboard/src/components/vector_store_management/vector_store_info.tsx+++ b/ui/litellm-dashboard/src/components/vector_store_management/vector_store_info.tsx@@ -25,6 +25,7 @@ import { vectorStoreInfoCall, vectorStoreUpdateCall, credentialListCall, Credentimport { VectorStore } from "./types";import { Providers, providerLogoMap, provider_map } from "../provider_info_helpers";import VectorStoreTester from "./VectorStoreTester";+import NotificationManager from "../molecules/notifications_manager";interface VectorStoreInfoViewProps {vectorStoreId: string;@@ -74,7 +75,7 @@ const VectorStoreInfoView: React.FC<VectorStoreInfoViewProps> = ({}} catch (error) {console.error("Error fetching vector store details:", error);- message.error("Error fetching vector store details: " + error);+ NotificationManager.fromBackend("Error fetching vector store details: " + error);}};@@ -102,7 +103,7 @@ const VectorStoreInfoView: React.FC<VectorStoreInfoViewProps> = ({try {metadata = metadataString ? JSON.parse(metadataString) : {};} catch (e) {- message.error("Invalid JSON in metadata field");+ NotificationManager.fromBackend("Invalid JSON in metadata field");return;}@@ -120,7 +121,7 @@ const VectorStoreInfoView: React.FC<VectorStoreInfoViewProps> = ({fetchVectorStoreDetails();} catch (error) {console.error("Error updating vector store:", error);- message.error("Error updating vector store: " + error);+ NotificationManager.fromBackend("Error updating vector store: " + error);}};diff --git a/ui/litellm-dashboard/src/components/view_logs/RequestResponsePanel.tsx b/ui/litellm-dashboard/src/components/view_logs/RequestResponsePanel.tsxindex 63d27555b4e..939c0ce62f5 100644--- a/ui/litellm-dashboard/src/components/view_logs/RequestResponsePanel.tsx+++ b/ui/litellm-dashboard/src/components/view_logs/RequestResponsePanel.tsx@@ -1,5 +1,6 @@import { LogEntry } from "./columns";import { message } from "antd";+import NotificationManager from "../molecules/notifications_manager";interface RequestResponsePanelProps {row: {@@ -57,7 +58,7 @@ export function RequestResponsePanel({if (success) {message.success('Request copied to clipboard');} else {- message.error('Failed to copy request');+ NotificationManager.fromBackend('Failed to copy request');}};@@ -66,7 +67,7 @@ export function RequestResponsePanel({if (success) {message.success('Response copied to clipboard');} else {- message.error('Failed to copy response');+ NotificationManager.fromBackend('Failed to copy response');}};diff --git a/ui/litellm-dashboard/src/components/view_users.tsx b/ui/litellm-dashboard/src/components/view_users.tsxindex 0275454abd0..55d0fd4e01f 100644--- a/ui/litellm-dashboard/src/components/view_users.tsx+++ b/ui/litellm-dashboard/src/components/view_users.tsx@@ -29,6 +29,7 @@ import { useQuery, useQueryClient } from "@tanstack/react-query"import { updateExistingKeys } from "@/utils/dataUtils"import { useDebouncedState } from "@tanstack/react-pacer/debouncer"import { isAdminRole } from "@/utils/roles"+import NotificationManager from "./molecules/notifications_manager"interface ViewUserDashboardProps {accessToken: string | null@@ -138,7 +139,7 @@ const ViewUserDashboard: React.FC<ViewUserDashboardProps> = ({ accessToken, tokeconst handleResetPassword = async (userId: string) => {if (!accessToken) {- message.error("Access token not found")+ NotificationManager.fromBackend("Access token not found")return}try {@@ -147,7 +148,7 @@ const ViewUserDashboard: React.FC<ViewUserDashboardProps> = ({ accessToken, tokesetInvitationLinkData(data)setIsInvitationLinkModalVisible(true)} catch (error) {- message.error("Failed to generate password reset link")+ NotificationManager.fromBackend("Failed to generate password reset link")}}@@ -166,7 +167,7 @@ const ViewUserDashboard: React.FC<ViewUserDashboardProps> = ({ accessToken, tokemessage.success("User deleted successfully")} catch (error) {console.error("Error deleting user:", error)- message.error("Failed to delete user")+ NotificationManager.fromBackend("Failed to delete user")}}setIsDeleteModalOpen(false)@@ -228,7 +229,7 @@ const ViewUserDashboard: React.FC<ViewUserDashboardProps> = ({ accessToken, tokeconst handleBulkEdit = () => {if (selectedUsers.length === 0) {- message.error("Please select users to edit")+ NotificationManager.fromBackend("Please select users to edit")return}diff --git a/ui/litellm-dashboard/src/components/view_users/user_info_view.tsx b/ui/litellm-dashboard/src/components/view_users/user_info_view.tsxindex 8686d6c633f..6bfdc62a890 100644--- a/ui/litellm-dashboard/src/components/view_users/user_info_view.tsx+++ b/ui/litellm-dashboard/src/components/view_users/user_info_view.tsx@@ -15,6 +15,7 @@ import { UserEditView } from "../user_edit_view"import OnboardingModal, { InvitationLink } from "../onboarding_link"import { formatNumberWithCommas, copyToClipboard as utilCopyToClipboard } from "@/utils/dataUtils"import { CopyIcon, CheckIcon } from "lucide-react";+import NotificationManager from "../molecules/notifications_manager";interface UserInfoViewProps {userId: string@@ -83,7 +84,7 @@ export default function UserInfoView({setUserModels(availableModels)} catch (error) {console.error("Error fetching user data:", error)- message.error("Failed to fetch user data")+ NotificationManager.fromBackend("Failed to fetch user data")} finally {setIsLoading(false)}@@ -94,7 +95,7 @@ export default function UserInfoView({const handleResetPassword = async () => {if (!accessToken) {- message.error("Access token not found")+ NotificationManager.fromBackend("Access token not found")return}try {@@ -103,7 +104,7 @@ export default function UserInfoView({setInvitationLinkData(data)setIsInvitationLinkModalVisible(true)} catch (error) {- message.error("Failed to generate password reset link")+ NotificationManager.fromBackend("Failed to generate password reset link")}}@@ -118,7 +119,7 @@ export default function UserInfoView({onClose()} catch (error) {console.error("Error deleting user:", error)- message.error("Failed to delete user")+ NotificationManager.fromBackend("Failed to delete user")}}@@ -144,7 +145,7 @@ export default function UserInfoView({setIsEditing(false)} catch (error) {console.error("Error updating user:", error)- message.error("Failed to update user")+ NotificationManager.fromBackend("Failed to update user")}}diff --git a/ui/litellm-dashboard/src/utils/dataUtils.ts b/ui/litellm-dashboard/src/utils/dataUtils.tsindex 0aeefbadc03..b908c0b2c8d 100644--- a/ui/litellm-dashboard/src/utils/dataUtils.ts+++ b/ui/litellm-dashboard/src/utils/dataUtils.ts@@ -1,3 +1,4 @@+import NotificationManager from "@/components/molecules/notifications_manager";import { message } from "antd";export function updateExistingKeys<Source extends Object>(@@ -35,7 +36,7 @@ export const copyToClipboard = async (message.success(messageText);return true;} catch (err) {- message.error("Failed to copy to clipboard");+ NotificationManager.fromBackend("Failed to copy to clipboard");console.error("Failed to copy: ", err);return false;}