fix(#492): manifest effort.agent_overrides and effort.default now fall back correctly

Steps 2 and 4 of resolveEffortInternal now include an else branch that
consults CANONICAL_CONFIG_DEFAULTS.effort when effortCfg is null, mirroring
the existing Step 3 manifest-fallback pattern for routing_tier_defaults.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-06-01 09:52:39 -04:00
committed by GitHub
parent 78871a7371
commit ef436aae62
3 changed files with 64 additions and 0 deletions

View File

@@ -1855,6 +1855,12 @@ function resolveEffortInternal(cwd, agentType, opts) {
const v = ao[agentType];
if (typeof v === 'string' && EFFORT_SET.has(v)) return v;
}
} else {
const mao = CANONICAL_CONFIG_DEFAULTS.effort && CANONICAL_CONFIG_DEFAULTS.effort.agent_overrides;
if (mao && typeof mao === 'object' && !Array.isArray(mao)) {
const v = mao[agentType];
if (typeof v === 'string' && EFFORT_SET.has(v)) return v;
}
}
// Step 3: routing_tier_defaults by agent's default tier.
@@ -1886,6 +1892,9 @@ function resolveEffortInternal(cwd, agentType, opts) {
if (effortCfg) {
const d = effortCfg.default;
if (typeof d === 'string' && EFFORT_SET.has(d)) return d;
} else {
const d = CANONICAL_CONFIG_DEFAULTS.effort && CANONICAL_CONFIG_DEFAULTS.effort.default;
if (typeof d === 'string' && EFFORT_SET.has(d)) return d;
}
// Step 5: hardcoded default