fix(claude): normalize adaptive auto effort (#3792)

Claude adaptive requests without an explicit effort are normalized to
output_config.effort: "high" instead of forwarding the unsupported
literal value "auto" which Anthropic rejects with HTTP 400.
This commit is contained in:
Sutarto Jordan Chrisfivo
2026-09-05 21:37:32 +07:00
committed by decolua
parent 1442cc73ce
commit 77e6a227fe
2 changed files with 11 additions and 1 deletions

View File

@@ -246,7 +246,7 @@ function applyFormat(fmt, body, cfg, caps, supportedLevels) {
if (canDisable) body.thinking = { type: "adaptive" };
else delete body.thinking;
const level = toLevel(eff);
body.output_config = { effort: level === "xhigh" ? "high" : level };
body.output_config = { effort: level === "xhigh" || level === "auto" ? "high" : level };
break;
}
case "claude-budget": {