diff --git a/open-sse/providers/thinkingLevels.js b/open-sse/providers/thinkingLevels.js index 0890e4ec..89865593 100644 --- a/open-sse/providers/thinkingLevels.js +++ b/open-sse/providers/thinkingLevels.js @@ -42,6 +42,8 @@ const PATTERN_THINKING = [ { provider: "codex", pattern: "*gpt-5.6-luna*", levels: CODEX_GPT_5_6_LEVELS }, { pattern: "*codex*", levels: ["low", "medium", "high", "xhigh"] }, // codex cannot disable thinking { pattern: "*mimo*v2.6*", levels: ["none", "low", "medium", "high", "xhigh"] }, + // mimo-v2.5-pro on opencode-go rejects reasoning_effort "max" (probed live); v2.5 accepts it. + { pattern: "*mimo*v2.5-pro*", levels: ["none", "low", "medium", "high", "xhigh"] }, // DeepSeek v4.* (Alibaba MaaS, probed live): effort low|medium|high|xhigh|max // all 200 via output_config.effort; "none" is a 400 on the anthropic route // (disable thinking instead). none kept for the picker = disable. diff --git a/open-sse/translator/concerns/thinkingUnified.js b/open-sse/translator/concerns/thinkingUnified.js index 4bc9601f..3ccd442f 100644 --- a/open-sse/translator/concerns/thinkingUnified.js +++ b/open-sse/translator/concerns/thinkingUnified.js @@ -302,9 +302,12 @@ function applyFormat(fmt, body, cfg, caps, supportedLevels, display) { case "deepseek": { if (none && canDisable) { body.thinking = { type: "disabled" }; break; } body.thinking = { type: "enabled" }; - // DeepSeek: low/medium→high, xhigh/max→max. + // DeepSeek: low/medium→high, xhigh/max→max. Some backends (mimo v2.5-pro/v2.6 + // on opencode-go, probed live) 400 on "max" — clamp to high when the declared + // levels exclude it. const level = toLevel(eff); - body.reasoning_effort = level === "xhigh" || level === "max" ? "max" : "high"; + const want = level === "xhigh" || level === "max" ? "max" : "high"; + body.reasoning_effort = want === "max" && supportedLevels && !supportedLevels.includes("max") ? "high" : want; break; } case "kimi": {