Skip to content

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]

feat(ui): add Lite mixed-provider auto-router preset (#37068)

tin-berri3c3ada9af0d9
diff --git a/ui/litellm-dashboard/src/autorouter_presets.json b/ui/litellm-dashboard/src/autorouter_presets.json
index db46da08a3d..9a38c6b1a17 100644
--- a/ui/litellm-dashboard/src/autorouter_presets.json
+++ b/ui/litellm-dashboard/src/autorouter_presets.json
@@ -15,6 +15,28 @@
"deployment_affinity": true
}
},
+ "lite": {
+ "label": "Lite",
+ "description": "Cost-optimized routing across providers: DeepSeek V4 Flash for simple queries, Muse Spark 1.2 for medium, Kimi K3 for complex, Claude Opus 5 for reasoning-heavy requests. An LLM classifier with the agentic rubric assigns tiers.",
+ "complexity_router_config": {
+ "tiers": {
+ "SIMPLE": ["deepseek-v4-flash"],
+ "MEDIUM": ["muse-spark-1.2"],
+ "COMPLEX": ["kimi-k3"],
+ "REASONING": ["claude-opus-5"]
+ },
+ "classifier_type": "llm",
+ "classifier_llm_config": {
+ "model": "deepseek-v4-flash",
+ "timeout_ms": 3000,
+ "classification_rubric": "agentic"
+ },
+ "classifier_context_window_size": 0,
+ "escalation_keywords": ["LITELLM ESCALATE"],
+ "session_affinity": false,
+ "deployment_affinity": true
+ }
+ },
"openai_family": {
"label": "OpenAI Family",
"description": "Routes across the GPT model family: gpt-5.4-nano for simple queries, gpt-5.4-mini for medium, gpt-5.4 for complex, o3 for reasoning-heavy requests.",
diff --git a/ui/litellm-dashboard/src/components/add_model/add_auto_router_tab.test.tsx b/ui/litellm-dashboard/src/components/add_model/add_auto_router_tab.test.tsx
index 4c834022291..6e71f64bcbd 100644
--- a/ui/litellm-dashboard/src/components/add_model/add_auto_router_tab.test.tsx
+++ b/ui/litellm-dashboard/src/components/add_model/add_auto_router_tab.test.tsx
@@ -353,7 +353,7 @@ describe("AddAutoRouterTab", () => {
(option) => option.querySelector(".font-medium")?.textContent,
);
- expect(labels).toEqual(["Anthropic Family", "OpenAI Family", "Custom Configuration"]);
+ expect(labels).toEqual(["Anthropic Family", "Lite", "OpenAI Family", "Custom Configuration"]);
});
describe("routing test", () => {
@@ -738,7 +738,7 @@ describe("AddAutoRouterTab", () => {
const labels = Array.from(document.querySelectorAll<HTMLElement>(".ant-select-item-option")).map(
(option) => option.querySelector(".font-medium")?.textContent,
);
- expect(labels).toEqual(["Anthropic Family", "OpenAI Family", "Custom Configuration"]);
+ expect(labels).toEqual(["Anthropic Family", "Lite", "OpenAI Family", "Custom Configuration"]);
});
it.each([
diff --git a/ui/litellm-dashboard/src/lib/autorouter_presets.test.ts b/ui/litellm-dashboard/src/lib/autorouter_presets.test.ts
index 23ae905d9db..81f2dc79bda 100644
--- a/ui/litellm-dashboard/src/lib/autorouter_presets.test.ts
+++ b/ui/litellm-dashboard/src/lib/autorouter_presets.test.ts
@@ -18,9 +18,9 @@ import { DEFAULT_ESCALATION_KEYWORDS } from "@/components/add_model/EscalationKe
const groupsOnly = (models: Iterable<string>) => buildModelAvailability(models, []);
describe("autorouter_presets", () => {
- it("loads exactly the two model-family presets", () => {
+ it("loads exactly the bundled presets", () => {
const presets = getAllPresets();
- expect(presets.map((p) => p.label).sort()).toEqual(["Anthropic Family", "OpenAI Family"]);
+ expect(presets.map((p) => p.label).sort()).toEqual(["Anthropic Family", "Lite", "OpenAI Family"]);
// Every preset carries all four fields the UI relies on; a JSON typo dropping one fails here.
for (const p of presets) {
expect(p).toMatchObject({ key: expect.any(String), label: expect.any(String), description: expect.any(String) });
@@ -33,9 +33,8 @@ describe("autorouter_presets", () => {
expect(getPresetByKey("does_not_exist")).toBeUndefined();
});
- it("keeps every preset a plain heuristic complexity router (no adaptive/quality settings)", () => {
+ it("keeps every preset free of adaptive/quality settings", () => {
for (const { complexity_router_config: config } of getAllPresets()) {
- expect(config.classifier_type).toBe("heuristic");
expect(config.adaptive).toBeUndefined();
expect(config.adaptive_weights).toBeUndefined();
expect(config.adaptive_eligible).toBeUndefined();
@@ -43,6 +42,31 @@ describe("autorouter_presets", () => {
}
});
+ it("keeps the model-family presets on the heuristic classifier", () => {
+ for (const key of ["anthropic_family", "openai_family"]) {
+ expect(getPresetByKey(key)!.complexity_router_config.classifier_type).toBe("heuristic");
+ }
+ });
+
+ // The lite preset ships the LLM classifier with the bundled agentic rubric rather than an inline
+ // system_prompt, so rubric tuning in the backend reaches it without a JSON edit. Its classifier
+ // model doubles as the SIMPLE tier model, so availability gating stays at exactly four models.
+ it("pins the lite preset's LLM classifier config and required models", () => {
+ const lite = getPresetByKey("lite")!;
+ const config = lite.complexity_router_config;
+ expect(config.classifier_type).toBe("llm");
+ expect(config.classifier_llm_config).toEqual({
+ model: "deepseek-v4-flash",
+ timeout_ms: 3000,
+ classification_rubric: "agentic",
+ });
+ expect(config.classifier_context_window_size).toBe(0);
+ expect(config.classifier_context_per_turn_chars).toBeUndefined();
+ expect(getRequiredModelsInPreset(lite)).toEqual(
+ new Set(["deepseek-v4-flash", "muse-spark-1.2", "kimi-k3", "claude-opus-5"]),
+ );
+ });
+
it("collects every tier model as a required model", () => {
const preset = getPresetByKey("anthropic_family")!;
const required = getRequiredModelsInPreset(preset);