refactor: 移除 resolveAppliedEffort 中的 max/xhigh 降级分支

This commit is contained in:
claude-code-best
2026-05-22 20:09:53 +08:00
parent 7b52054ff5
commit 03598d3f84

View File

@@ -185,10 +185,6 @@ export function resolveAppliedEffort(
} }
const resolved = const resolved =
envOverride ?? appStateEffortValue ?? getDefaultEffortForModel(model) envOverride ?? appStateEffortValue ?? getDefaultEffortForModel(model)
// API rejects 'xhigh' on pre-Opus-4.7 models — downgrade to 'high'.
if (resolved === 'xhigh' && !modelSupportsXhighEffort(model)) {
return 'high'
}
// OpenAI Responses uses xhigh as its highest public reasoning effort. // OpenAI Responses uses xhigh as its highest public reasoning effort.
// Keep /effort max usable as a familiar alias in ChatGPT subscription mode. // Keep /effort max usable as a familiar alias in ChatGPT subscription mode.
if ( if (
@@ -199,10 +195,6 @@ export function resolveAppliedEffort(
) { ) {
return 'xhigh' return 'xhigh'
} }
// API rejects 'max' on non-Opus-4.6 models — downgrade to 'high'.
if (resolved === 'max' && !modelSupportsMaxEffort(model)) {
return 'high'
}
return resolved return resolved
} }