VALID_PROFILES was derived solely from Object.keys(MODEL_PROFILES['gsd-planner']), which only contained the named tiers (quality/balanced/budget/adaptive). The cmdConfigSetModelProfile validator rejected 'inherit' even though the runtime has supported it since #1829. Fix: append 'inherit' to VALID_PROFILES and handle it in getAgentToModelMapForProfile so the agent→model table shows 'inherit' instead of undefined. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,7 @@ const MODEL_PROFILES = {
|
||||
'gsd-doc-writer': { quality: 'opus', balanced: 'sonnet', budget: 'haiku', adaptive: 'sonnet' },
|
||||
'gsd-doc-verifier': { quality: 'sonnet', balanced: 'sonnet', budget: 'haiku', adaptive: 'haiku' },
|
||||
};
|
||||
const VALID_PROFILES = Object.keys(MODEL_PROFILES['gsd-planner']);
|
||||
const VALID_PROFILES = [...Object.keys(MODEL_PROFILES['gsd-planner']), 'inherit'];
|
||||
|
||||
/**
|
||||
* Formats the agent-to-model mapping as a human-readable table (in string format).
|
||||
@@ -58,7 +58,9 @@ function formatAgentToModelMapAsTable(agentToModelMap) {
|
||||
function getAgentToModelMapForProfile(normalizedProfile) {
|
||||
const agentToModelMap = {};
|
||||
for (const [agent, profileToModelMap] of Object.entries(MODEL_PROFILES)) {
|
||||
agentToModelMap[agent] = profileToModelMap[normalizedProfile];
|
||||
agentToModelMap[agent] = normalizedProfile === 'inherit'
|
||||
? 'inherit'
|
||||
: profileToModelMap[normalizedProfile];
|
||||
}
|
||||
return agentToModelMap;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user