fix(#2601): config-set-model-profile now accepts 'inherit' value (#2707)

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:
Tom Boucher
2026-04-25 12:09:27 -04:00
committed by GitHub
parent b7ff14fe51
commit 8393f4b355
3 changed files with 60 additions and 6 deletions

View File

@@ -65,13 +65,16 @@ describe('MODEL_PROFILES', () => {
// ─── VALID_PROFILES ───────────────────────────────────────────────────────────
describe('VALID_PROFILES', () => {
test('contains quality, balanced, and budget', () => {
assert.deepStrictEqual(VALID_PROFILES.sort(), ['adaptive', 'balanced', 'budget', 'quality']);
test('contains quality, balanced, budget, adaptive, and inherit', () => {
assert.deepStrictEqual(VALID_PROFILES.sort(), ['adaptive', 'balanced', 'budget', 'inherit', 'quality']);
});
test('is derived from MODEL_PROFILES keys', () => {
test('includes all MODEL_PROFILES keys plus inherit', () => {
const fromData = Object.keys(MODEL_PROFILES['gsd-planner']);
assert.deepStrictEqual(VALID_PROFILES.sort(), fromData.sort());
for (const profile of fromData) {
assert.ok(VALID_PROFILES.includes(profile), `VALID_PROFILES should include ${profile}`);
}
assert.ok(VALID_PROFILES.includes('inherit'), 'VALID_PROFILES should include inherit');
});
});