mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
fix(kimi): normalize reasoning_effort to backend enum (#2427)
Map auto→high, minimal→low, xhigh→max and whitelist low/medium/high/max so Kimi/kimchi SGLang backends no longer receive invalid effort values. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
decolua
co-authored by
Cursor
parent
97a6708651
commit
8c068a1f5c
@@ -106,6 +106,16 @@ describe("applyThinking per provider format", () => {
|
||||
const out = apply("openai", "kimi-k2.6", { reasoning_effort: "high" }, "kimi");
|
||||
expect(out.reasoning_effort).toBe("high");
|
||||
});
|
||||
it("Kimi auto → supported reasoning_effort", () => {
|
||||
const out = apply("openai", "kimi-k2.7", { reasoning_effort: "auto" }, "kimchi");
|
||||
expect(out.reasoning_effort).toBe("high");
|
||||
});
|
||||
it("Kimi unsupported OpenAI levels → supported reasoning_effort", () => {
|
||||
const minimal = apply("openai", "kimi-k2.7", { reasoning_effort: "minimal" }, "kimchi");
|
||||
const xhigh = apply("openai", "kimi-k2.7", { reasoning_effort: "xhigh" }, "kimchi");
|
||||
expect(minimal.reasoning_effort).toBe("low");
|
||||
expect(xhigh.reasoning_effort).toBe("max");
|
||||
});
|
||||
it("MiniMax M3 → adaptive", () => {
|
||||
const out = apply("claude", "MiniMax-M3", { reasoning_effort: "high" }, "minimax");
|
||||
expect(out.thinking).toEqual({ type: "adaptive" });
|
||||
|
||||
Reference in New Issue
Block a user