fix(core): return 'opus' directly instead of mapping to 'inherit' (#1079)
resolveModelInternal() was converting 'opus' to 'inherit', assuming the parent process runs on Opus. When the orchestrator runs on Sonnet (the default), 'inherit' resolves to Sonnet — silently downgrading quality profile subagents. Remove the opus→inherit conversion so the resolved model name is passed through directly. Claude Code's Task tool now supports model aliases like 'opus', 'sonnet', 'haiku'. Fixes #695
This commit is contained in:
@@ -374,7 +374,7 @@ function resolveModelInternal(cwd, agentType) {
|
|||||||
// Check per-agent override first
|
// Check per-agent override first
|
||||||
const override = config.model_overrides?.[agentType];
|
const override = config.model_overrides?.[agentType];
|
||||||
if (override) {
|
if (override) {
|
||||||
return override === 'opus' ? 'inherit' : override;
|
return override;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fall back to profile lookup
|
// Fall back to profile lookup
|
||||||
@@ -382,8 +382,7 @@ function resolveModelInternal(cwd, agentType) {
|
|||||||
const agentModels = MODEL_PROFILES[agentType];
|
const agentModels = MODEL_PROFILES[agentType];
|
||||||
if (!agentModels) return 'sonnet';
|
if (!agentModels) return 'sonnet';
|
||||||
if (profile === 'inherit') return 'inherit';
|
if (profile === 'inherit') return 'inherit';
|
||||||
const resolved = agentModels[profile] || agentModels['balanced'] || 'sonnet';
|
return agentModels[profile] || agentModels['balanced'] || 'sonnet';
|
||||||
return resolved === 'opus' ? 'inherit' : resolved;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ─── Misc utilities ───────────────────────────────────────────────────────────
|
// ─── Misc utilities ───────────────────────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user