Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ui/litellm-dashboard/src/autorouter_presets.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,18 @@
},
"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.",
"description": "Cost-optimized routing across providers: DeepSeek V4 Flash for simple queries, Muse Spark 1.2 at xhigh for medium, Kimi K3 at max for complex, Claude Opus 5 for reasoning. 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"]
},
"tier_model_configs": {
"MEDIUM": [{ "model_name": "muse-spark-1.2", "litellm_params": { "reasoning_effort": "xhigh" } }],
"COMPLEX": [{ "model_name": "kimi-k3", "litellm_params": { "reasoning_effort": "max" } }]
},
"classifier_type": "llm",
"classifier_llm_config": {
"model": "deepseek-v4-flash",
Expand Down
17 changes: 17 additions & 0 deletions ui/litellm-dashboard/src/lib/autorouter_presets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@
});
});

// Kimi K3 at max needs the map to declare max for kimi-k3, which is the commit below this one.
it("pins the lite preset's per-tier reasoning efforts", () => {
expect(getPresetByKey("lite")!.complexity_router_config.tier_model_configs).toEqual({
MEDIUM: [{ model_name: "muse-spark-1.2", litellm_params: { reasoning_effort: "xhigh" } }],
COMPLEX: [{ model_name: "kimi-k3", litellm_params: { reasoning_effort: "max" } }],
});
});

// serializeTierModelConfigs filters on the tier's models, so a stray name drops silently.
it("never names a model in tier_model_configs that its own tier does not hold", () => {
for (const preset of getAllPresets()) {
Expand All @@ -129,6 +137,15 @@
});
});

it("prefills the lite preset's efforts through to tier_model_params", () => {
const lite = getPresetByKey("lite")!;
const prefill = buildPresetPrefill(lite.complexity_router_config, groupsOnly(getRequiredModelsInPreset(lite)));
expect(prefill.complexityRouterConfig.tier_model_params).toEqual({
MEDIUM: { "muse-spark-1.2": { reasoning_effort: "xhigh" } },
COMPLEX: { "kimi-k3": { reasoning_effort: "max" } },
});
});

it("pins the gemini preset to concrete model ids, never Google's hot-swapping -latest aliases", () => {
const gemini = getPresetByKey("gemini_family")!;
const config = gemini.complexity_router_config;
Expand Down Expand Up @@ -558,7 +575,7 @@

it("falls back to the defaults when a preset omits match_threshold and escalation_keywords", () => {
const prefill = buildPresetPrefill(
{

Check warning on line 578 in ui/litellm-dashboard/src/lib/autorouter_presets.test.ts

View workflow job for this annotation

GitHub Actions / frontend-lint

Object literal with 4 properties passed inline as an argument; assign it to a named variable first
tiers: { SIMPLE: ["gpt-5-nano"], MEDIUM: [], COMPLEX: [], REASONING: [] },
classifier_type: "heuristic",
session_affinity: false,
Expand Down
Loading