feat(auto-router): refresh family reasoning presets (#40341)

This commit is contained in:
tin-berri 2026-09-08 18:28:46 -07:00 committed by GitHub
parent f5e4aa38ba
commit 314e573529
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 42 additions and 18 deletions

View file

@ -10,7 +10,12 @@
"REASONING": ["claude-opus-5"]
},
"tier_model_configs": {
"REASONING": [{ "model_name": "claude-opus-5", "litellm_params": { "reasoning_effort": "high" } }]
"REASONING": [
{
"model_name": "claude-opus-5",
"litellm_params": { "reasoning_effort": "high" }
}
]
},
"classifier_type": "heuristic_v2",
"escalation_keywords": ["LITELLM ESCALATE"],
@ -23,16 +28,21 @@
},
"anthropic_family": {
"label": "Anthropic Family",
"description": "Routes across the Claude model family: Haiku for simple queries, Sonnet for medium, Opus for complex, Opus at high thinking for reasoning.",
"description": "Routes across the Claude model family: Haiku for simple queries, Sonnet for medium, Opus for complex, Fable 5.1 at high thinking for reasoning.",
"complexity_router_config": {
"tiers": {
"SIMPLE": ["claude-haiku-4-5"],
"MEDIUM": ["claude-sonnet-5"],
"COMPLEX": ["claude-opus-5"],
"REASONING": ["claude-opus-5"]
"REASONING": ["claude-fable-5-1"]
},
"tier_model_configs": {
"REASONING": [{ "model_name": "claude-opus-5", "litellm_params": { "reasoning_effort": "high" } }]
"REASONING": [
{
"model_name": "claude-fable-5-1",
"litellm_params": { "reasoning_effort": "high" }
}
]
},
"classifier_type": "heuristic",
"escalation_keywords": ["LITELLM ESCALATE"],
@ -73,8 +83,18 @@
"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" } }]
"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": {
@ -93,16 +113,21 @@
},
"openai_family": {
"label": "OpenAI Family",
"description": "Routes across the GPT model family: Luna for simple queries, Terra for medium, Sol for complex, Sol at xhigh thinking for reasoning.",
"description": "Routes across the GPT model family: Luna for simple queries, Terra for medium, Sol for complex, Astra at xhigh thinking for reasoning.",
"complexity_router_config": {
"tiers": {
"SIMPLE": ["gpt-5.6-luna"],
"MEDIUM": ["gpt-5.6-terra"],
"COMPLEX": ["gpt-5.6-sol"],
"REASONING": ["gpt-5.6-sol"]
"REASONING": ["gpt-6-astra"]
},
"tier_model_configs": {
"REASONING": [{ "model_name": "gpt-5.6-sol", "litellm_params": { "reasoning_effort": "xhigh" } }]
"REASONING": [
{
"model_name": "gpt-6-astra",
"litellm_params": { "reasoning_effort": "xhigh" }
}
]
},
"classifier_type": "heuristic",
"escalation_keywords": ["LITELLM ESCALATE"],

View file

@ -149,13 +149,12 @@ describe("autorouter_presets", () => {
);
});
// Opus serves both tiers, so the effort is all that separates them and losing it fails silently.
it("pins the anthropic preset's reasoning tier to Opus at high thinking", () => {
it("pins the anthropic preset's reasoning tier to Fable 5.1 at high thinking", () => {
const config = getPresetByKey("anthropic_family")!.complexity_router_config;
expect(config.tiers.COMPLEX).toEqual(["claude-opus-5"]);
expect(config.tiers.REASONING).toEqual(["claude-opus-5"]);
expect(config.tiers.REASONING).toEqual(["claude-fable-5-1"]);
expect(config.tier_model_configs).toEqual({
REASONING: [{ model_name: "claude-opus-5", litellm_params: { reasoning_effort: "high" } }],
REASONING: [{ model_name: "claude-fable-5-1", litellm_params: { reasoning_effort: "high" } }],
});
});
@ -214,7 +213,7 @@ describe("autorouter_presets", () => {
const preset = getPresetByKey("anthropic_family")!;
const prefill = buildPresetPrefill(preset.complexity_router_config, groupsOnly(getRequiredModelsInPreset(preset)));
expect(prefill.complexityRouterConfig.tier_model_params).toEqual({
REASONING: { "claude-opus-5": { reasoning_effort: "high" } },
REASONING: { "claude-fable-5-1": { reasoning_effort: "high" } },
});
});
@ -227,21 +226,21 @@ describe("autorouter_presets", () => {
});
});
it("pins the OpenAI preset to the Luna, Terra, and Sol progression", () => {
it("pins the OpenAI preset to the Luna, Terra, Sol, and Astra progression", () => {
const preset = getPresetByKey("openai_family")!;
const expectedTiers = {
SIMPLE: ["gpt-5.6-luna"],
MEDIUM: ["gpt-5.6-terra"],
COMPLEX: ["gpt-5.6-sol"],
REASONING: ["gpt-5.6-sol"],
REASONING: ["gpt-6-astra"],
};
expect(preset.complexity_router_config.tiers).toEqual(expectedTiers);
expect(preset.complexity_router_config.tier_model_configs).toEqual({
REASONING: [{ model_name: "gpt-5.6-sol", litellm_params: { reasoning_effort: "xhigh" } }],
REASONING: [{ model_name: "gpt-6-astra", litellm_params: { reasoning_effort: "xhigh" } }],
});
const prefill = buildPresetPrefill(preset.complexity_router_config, groupsOnly(getRequiredModelsInPreset(preset)));
expect(prefill.complexityRouterConfig.tier_model_params).toEqual({
REASONING: { "gpt-5.6-sol": { reasoning_effort: "xhigh" } },
REASONING: { "gpt-6-astra": { reasoning_effort: "xhigh" } },
});
});