diff --git a/src/lib/combos/intelligentRouting.ts b/src/lib/combos/intelligentRouting.ts index 976e13e047..4fa6c86b84 100644 --- a/src/lib/combos/intelligentRouting.ts +++ b/src/lib/combos/intelligentRouting.ts @@ -58,6 +58,7 @@ export const DEFAULT_INTELLIGENT_WEIGHTS: IntelligentRoutingWeights = { }; export const MODE_PACK_OPTIONS = [ + { id: "custom", label: "Custom / None (Use Sliders)", emoji: "tune" }, { id: "ship-fast", label: "Ship Fast", emoji: "rocket_launch" }, { id: "cost-saver", label: "Cost Saver", emoji: "savings" }, { id: "quality-first", label: "Quality First", emoji: "target" }, diff --git a/tests/unit/autocombo-unification.test.ts b/tests/unit/autocombo-unification.test.ts index ebbafe62bb..1ead4afc9f 100644 --- a/tests/unit/autocombo-unification.test.ts +++ b/tests/unit/autocombo-unification.test.ts @@ -2,6 +2,7 @@ import test from "node:test"; import assert from "node:assert/strict"; const intelligentRouting = await import("../../src/lib/combos/intelligentRouting.ts"); +const { getModePack } = await import("../../open-sse/services/autoCombo/modePacks.ts"); test("getStrategyCategory classifies intelligent and deterministic strategies correctly", () => { assert.equal(intelligentRouting.getStrategyCategory("auto"), "intelligent"); @@ -155,6 +156,19 @@ test("sidebar visibility excludes the removed auto-combo item", async () => { ]); }); +test("custom mode-pack selection preserves explicit slider intent", () => { + assert.deepEqual(intelligentRouting.MODE_PACK_OPTIONS[0], { + id: "custom", + label: "Custom / None (Use Sliders)", + emoji: "tune", + }); + assert.equal( + intelligentRouting.normalizeIntelligentRoutingConfig({ modePack: "custom" }).modePack, + "custom" + ); + assert.equal(getModePack("custom"), undefined); +}); + test("intelligent routing helpers normalize config and build provider scores", () => { const normalizedConfig = intelligentRouting.normalizeIntelligentRoutingConfig({ candidatePool: ["openai", "anthropic"],