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
fixed issues #8126 and #8127 (#8275) (#8299)
Ishaan Jaffe41bc5f32b36
diff --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 56f1fe742e0..f64f6366cdc 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@@ -6,7 +6,8 @@ import { modelCreateCall, Model } from "../networking";export const handleAddModelSubmit = async (formValues: Record<string, any>,accessToken: string,- form: any+ form: any,+ callback?: ()=>void) => {try {console.log("handling submit for formValues:", formValues);@@ -137,6 +138,7 @@ export const handleAddModelSubmit = async (};const response: any = await modelCreateCall(accessToken, new_model);+ callback && callback()console.log(`response for model create call: ${response["data"]}`);});diff --git a/ui/litellm-dashboard/src/components/delete_model_button.tsx b/ui/litellm-dashboard/src/components/delete_model_button.tsxindex ee23cdb1b4c..db754874457 100644--- a/ui/litellm-dashboard/src/components/delete_model_button.tsx+++ b/ui/litellm-dashboard/src/components/delete_model_button.tsx@@ -13,11 +13,13 @@ import { TrashIcon } from "@heroicons/react/outline";interface DeleteModelProps {modelID: string;accessToken: string;+ callback?: ()=>void;}const DeleteModelButton: React.FC<DeleteModelProps> = ({modelID,accessToken,+ callback}) => {const [isModalVisible, setIsModalVisible] = useState(false);@@ -30,6 +32,7 @@ const DeleteModelButton: React.FC<DeleteModelProps> = ({console.log("model delete Response:", response);message.success(`Model ${modelID} deleted successfully`);setIsModalVisible(false);+ callback && setTimeout(callback, 4000) //added timeout of 4 seconds as deleted model is taking time to reflect in get models} catch (error) {console.error("Error deleting the model:", error);}diff --git a/ui/litellm-dashboard/src/components/model_dashboard.tsx b/ui/litellm-dashboard/src/components/model_dashboard.tsxindex a5dce262dfc..2cd9ab425bf 100644--- a/ui/litellm-dashboard/src/components/model_dashboard.tsx+++ b/ui/litellm-dashboard/src/components/model_dashboard.tsx@@ -1031,7 +1031,7 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({form.validateFields().then((values) => {- handleAddModelSubmit(values, accessToken, form);+ handleAddModelSubmit(values, accessToken, form, handleRefreshClick);// form.resetFields();}).catch((error) => {@@ -1450,6 +1450,7 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({<DeleteModelButtonmodelID={model.model_info.id}accessToken={accessToken}+ callback={handleRefreshClick}/></Col></Grid>diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsxindex 28e1b734222..e9f543a87b4 100644--- a/ui/litellm-dashboard/src/components/networking.tsx+++ b/ui/litellm-dashboard/src/components/networking.tsx@@ -98,7 +98,7 @@ export const modelCreateCall = async (const data = await response.json();console.log("API Response:", data);message.success(- "Model created successfully. Wait 60s and refresh on 'All Models' page"+ "Model created successfully");return data;} catch (error) {@@ -168,7 +168,6 @@ export const modelDeleteCall = async (const data = await response.json();console.log("API Response:", data);- message.success("Model deleted successfully. Restart server to see this.");return data;} catch (error) {console.error("Failed to create key:", error);