From 204c208d24254d70fdae48f27abf230957ca5e58 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 20 Sep 2025 12:33:28 -0700 Subject: [PATCH] fix(model_connection_test.tsx): pass modelinfo to `/health/test_connection` ensures team admins can test new models --- .../out/{model_hub_table.html => model_hub_table/index.html} | 0 litellm/proxy/_experimental/out/onboarding.html | 1 - .../src/components/add_model/handle_add_model_submit.tsx | 2 +- .../src/components/add_model/model_connection_test.tsx | 2 +- ui/litellm-dashboard/src/components/networking.tsx | 2 ++ 5 files changed, 4 insertions(+), 3 deletions(-) rename litellm/proxy/_experimental/out/{model_hub_table.html => model_hub_table/index.html} (100%) delete mode 100644 litellm/proxy/_experimental/out/onboarding.html diff --git a/litellm/proxy/_experimental/out/model_hub_table.html b/litellm/proxy/_experimental/out/model_hub_table/index.html similarity index 100% rename from litellm/proxy/_experimental/out/model_hub_table.html rename to litellm/proxy/_experimental/out/model_hub_table/index.html diff --git a/litellm/proxy/_experimental/out/onboarding.html b/litellm/proxy/_experimental/out/onboarding.html deleted file mode 100644 index eace6e4ee1..0000000000 --- a/litellm/proxy/_experimental/out/onboarding.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard \ No newline at end of file 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.tsx index 8aafd3f04e..0d788f6a13 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 @@ -1,6 +1,6 @@ import { message } from "antd"; import { provider_map, Providers } from "../provider_info_helpers"; -import { modelCreateCall, Model, testConnectionRequest } from "../networking"; +import { modelCreateCall, Model } from "../networking"; import React, { useState } from 'react'; import ConnectionErrorDisplay from './model_connection_test'; import NotificationManager from "../molecules/notifications_manager"; diff --git a/ui/litellm-dashboard/src/components/add_model/model_connection_test.tsx b/ui/litellm-dashboard/src/components/add_model/model_connection_test.tsx index 79b354ed51..e512f3d56a 100644 --- a/ui/litellm-dashboard/src/components/add_model/model_connection_test.tsx +++ b/ui/litellm-dashboard/src/components/add_model/model_connection_test.tsx @@ -57,7 +57,7 @@ const ModelConnectionTest: React.FC = ({ const { litellmParamsObj, modelInfoObj, modelName: returnedModelName } = result[0]; - const response = await testConnectionRequest(accessToken, litellmParamsObj, modelInfoObj?.mode); + const response = await testConnectionRequest(accessToken, litellmParamsObj, modelInfoObj, modelInfoObj?.mode); if (response.status === "success") { NotificationsManager.success("Connection test successful!"); setError(null); diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx index 7a5ca76b6a..b16543b8f7 100644 --- a/ui/litellm-dashboard/src/components/networking.tsx +++ b/ui/litellm-dashboard/src/components/networking.tsx @@ -3120,6 +3120,7 @@ export const keyInfoCall = async (accessToken: String, keys: String[]) => { export const testConnectionRequest = async ( accessToken: string, litellm_params: Record, + model_info: Record, mode: string ) => { try { @@ -3141,6 +3142,7 @@ export const testConnectionRequest = async ( }, body: JSON.stringify({ litellm_params: litellm_params, + model_info: model_info, mode: mode, }), });