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.tsx index 9e9a097e3fe..5eab6fd35de 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 @@ -436,11 +436,19 @@ const AddAutoRouterTab: React.FC = ({ form, handleOk, acc ]} width={700} > - {/* Only render the ConnectionErrorDisplay when modal is visible and we have a test ID */} {isResultModalVisible && ( = ({ console.log("Testing connection with form values:", formValues); const result = await prepareModelAddRequest(formValues, accessToken, null); - if (!result) { + if (!result || result.length === 0) { console.log("No result from prepareModelAddRequest"); setError("Failed to prepare model data. Please check your form inputs."); setIsSuccess(false);