= ({
return (
- Each configured tier routes to a saved model group. Test Connection runs a live health check against each one.
+ Each configured tier routes to a saved model group. Test Connection sends a minimal request through the proxy to
+ each one, exactly as the auto router would.
{targets.map((target, index) => {
const result = results[index] ?? { status: "pending" };
diff --git a/ui/litellm-dashboard/src/components/add_model/build_auto_router_test_targets.ts b/ui/litellm-dashboard/src/components/add_model/build_auto_router_test_targets.ts
index 0104b6bc9c5..b2a3cc10012 100644
--- a/ui/litellm-dashboard/src/components/add_model/build_auto_router_test_targets.ts
+++ b/ui/litellm-dashboard/src/components/add_model/build_auto_router_test_targets.ts
@@ -14,7 +14,14 @@ export interface BuildAutoRouterTestTargetsParams {
embeddingModel: string | undefined;
}
-const TIER_ORDER: (keyof ComplexityTiers)[] = ["SIMPLE", "MEDIUM", "COMPLEX", "REASONING"];
+// Keys drive iteration order; `satisfies Record` makes it a
+// compile error to add a tier to ComplexityTiers without listing it here (and vice versa).
+const TIER_ORDER = Object.keys({
+ SIMPLE: null,
+ MEDIUM: null,
+ COMPLEX: null,
+ REASONING: null,
+} satisfies Record) as (keyof ComplexityTiers)[];
export const buildAutoRouterTestTargets = ({
tiers,
diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx
index da6bb079876..ae263727569 100644
--- a/ui/litellm-dashboard/src/components/networking.tsx
+++ b/ui/litellm-dashboard/src/components/networking.tsx
@@ -2315,6 +2315,34 @@ export const testConnectionRequest = async (
}
};
+export type ModelGroupConnectionResult = { status: "success" } | { status: "error"; error: string };
+
+/**
+ * Test an existing model group by routing a minimal request through the proxy
+ * exactly as production would (by public model_group name). Unlike
+ * /health/test_connection, this needs no litellm_params resolution: the router
+ * resolves the group, credentials, and provider. Used by the auto-router Test
+ * Connection to probe each tier's model group and the embedding model.
+ */
+export const testModelGroupConnection = async (
+ accessToken: string,
+ modelGroup: string,
+ mode: "chat" | "embedding",
+): Promise => {
+ const path = mode === "embedding" ? "/v1/embeddings" : "/v1/chat/completions";
+ const body =
+ mode === "embedding"
+ ? { model: modelGroup, input: "test from litellm" }
+ : { model: modelGroup, messages: [{ role: "user", content: "test from litellm" }], max_tokens: 1 };
+
+ try {
+ await apiClient.post(path, { accessToken, body });
+ return { status: "success" };
+ } catch (error) {
+ return { status: "error", error: error instanceof Error ? error.message : String(error) };
+ }
+};
+
// ... existing code ...
export const keyInfoV1Call = async (accessToken: string, key: string) => {
try {