feat(task): add per-spawn effort ceiling

This commit is contained in:
Wolfgang Schoenberger
2026-07-27 03:39:55 -07:00
parent 02c50eb6f3
commit bd1605e8f5
5 changed files with 80 additions and 7 deletions
+7 -3
View File
@@ -2647,9 +2647,13 @@ export async function runSubprocess(options: ExecutorOptions): Promise<SingleRes
progress.contextWindow = model.contextWindow;
}
// Caller-requested coarse effort maps onto the resolved model's
// supported range; undefined (no effort, or no controllable effort
// surface) falls through to the normal selectors below.
const effortLevel = options.effort !== undefined ? resolveTaskEffortLevel(model, options.effort) : undefined;
// supported range, then respects the operator-configured ceiling.
// Undefined (no effort, or no controllable effort surface) falls
// through to the normal selectors below.
const effortLevel =
options.effort !== undefined
? resolveTaskEffortLevel(model, options.effort, settings.get("task.maxEffort"))
: undefined;
if (model) {
const displayLevel = effortLevel ?? (explicitThinkingLevel ? resolvedThinkingLevel : undefined);
progress.resolvedModel =