fix(opencode-go): clamp deepseek reasoning_effort "max" to "high" for mimo backends that reject it
mimo-v2.5-pro/v2.6 on the Go lane return 400 on reasoning_effort "max" (probed live; mimo-v2.5 accepts it). The deepseek applyFormat case now honors the declared thinking levels, and mimo-v2.5-pro gets a levels entry. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user