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
fix mode
Ishaan Jaff66dc49ab9290
diff --git a/ui/litellm-dashboard/src/components/add_model/ConnectionErrorDisplay.tsx b/ui/litellm-dashboard/src/components/add_model/ConnectionErrorDisplay.tsxindex 7a97dede7e5..f52c3b7df0b 100644--- a/ui/litellm-dashboard/src/components/add_model/ConnectionErrorDisplay.tsx+++ b/ui/litellm-dashboard/src/components/add_model/ConnectionErrorDisplay.tsx@@ -42,9 +42,12 @@ const ConnectionErrorDisplay: React.FC<ConnectionErrorDisplayProps> = ({const result = await prepareModelAddRequest(formValues, accessToken, null);if (!result) throw new Error("Failed to prepare model data");- const { litellmParamsObj } = result;+ console.log("result from prepareModelAddRequest:", result);++ const { litellmParamsObj, modelInfoObj, modelName: returnedModelName } = result;const requestBody = { ...litellmParamsObj, mode: testMode };+const response = await testConnectionRequest(accessToken, requestBody);if (response.status === "success") {message.success("Connection test successful!");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 bbb226cc11c..54f79bd52d6 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@@ -72,7 +72,6 @@ export const prepareModelAddRequest = async (} else if (key == "model") {continue;}-// Check if key is "base_model"else if (key === "base_model") {// Add key-value pair to model_info dictionary@@ -82,7 +81,11 @@ export const prepareModelAddRequest = async (modelInfoObj["team_id"] = value;}else if (key == "mode") {+ console.log("placing mode in modelInfo")modelInfoObj["mode"] = value;++ // remove "mode" from litellmParams+ delete litellmParamsObj["mode"];}else if (key === "custom_model_name") {litellmParamsObj["model"] = value;@@ -147,13 +150,13 @@ export const prepareModelAddRequest = async (};export const handleAddModelSubmit = async (+ values: any,accessToken: string,form: any,callback?: () => void,) => {try {- const formValues = form.getFieldsValue();- const result = await prepareModelAddRequest(formValues, accessToken, form);+ const result = await prepareModelAddRequest(values, accessToken, form);if (!result) {return; // Exit if preparation failed@@ -172,8 +175,6 @@ export const handleAddModelSubmit = async (callback && callback();form.resetFields();-- message.success("Model added successfully");} catch (error) {message.error("Failed to add model: " + error, 10);}