-
-
- {modelsUnverifiable && (
-
- Could not load available models.{" "}
-
-
- )}
- {presetsPending &&
Loading templates...
}
- {presetsUnavailable && (
-
- Could not load templates, so only Custom Configuration is shown.{" "}
-
-
+ {!automaticSetupLoading && automaticRouterConfig && (
+
)}
+
+
+
+
+ {modelsUnverifiable && (
+
+ Could not load available models.{" "}
+
+
+ )}
+ {presetsPending &&
Loading templates...
}
+ {presetsUnavailable && (
+
+ Could not load templates, so only Custom Configuration is shown.{" "}
+
+
+ )}
+
{requiresTeamScope && (
diff --git a/ui/litellm-dashboard/src/components/add_model/auto_setup.test.ts b/ui/litellm-dashboard/src/components/add_model/auto_setup.test.ts
new file mode 100644
index 00000000000..c5784db4501
--- /dev/null
+++ b/ui/litellm-dashboard/src/components/add_model/auto_setup.test.ts
@@ -0,0 +1,196 @@
+import { describe, expect, it } from "vitest";
+import type { AutoRouterDeployment } from "@/app/(dashboard)/hooks/models/useModels";
+import { buildModelAvailability } from "@/lib/autorouter_presets";
+import { buildAutomaticRouterConfig, buildPreferredTierModels, type PreferredTierModels } from "./auto_setup";
+
+const models = (...names: string[]) => names.map((model_group) => ({ model_group, mode: "chat" }));
+const reasoningModel = (model_group: string, supported_reasoning_efforts: string[]) => ({
+ model_group,
+ mode: "chat",
+ supports_reasoning: true,
+ supported_reasoning_efforts,
+});
+const deployment = (model_name: string, model = model_name): AutoRouterDeployment => ({
+ model_name,
+ litellm_params: { model },
+});
+const tierModels = (config: ReturnType