From cb149383c112e7fa0f01c8e1bc4a0bde29e875cb Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Sun, 26 Apr 2026 11:48:47 -0400 Subject: [PATCH] fix(config): bump MODEL_ALIAS_MAP to claude-opus-4-7 (#2733) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(config): bump MODEL_ALIAS_MAP and RUNTIME_PROFILE_MAP to claude-opus-4-7 Opus 4.7 shipped Q1 2026 but MODEL_ALIAS_MAP and RUNTIME_PROFILE_MAP.claude.opus were still pinned to claude-opus-4-6. Users with resolve_model_ids: true received stale model IDs in logs and agent-tool calls. Also adds a resolve_model_ids: true test suite — this path had zero coverage, which is why the stale ID survived undetected. Closes #2712 Co-Authored-By: Claude Sonnet 4.6 * refactor(config): derive RUNTIME_PROFILE_MAP.claude from MODEL_ALIAS_MAP (coderabbit) RUNTIME_PROFILE_MAP.claude was duplicating model IDs that MODEL_ALIAS_MAP already owns. Future model bumps now only require updating MODEL_ALIAS_MAP. Also fixes stale test assertion (claude-opus-4-6 → claude-opus-4-7). * fix(tests): update stale claude-opus-4-6 refs to claude-opus-4-7; DRY: derive RUNTIME_PROFILE_MAP.claude from MODEL_ALIAS_MAP - Update 3 hardcoded `claude-opus-4-6` assertions in tests/issue-2517-runtime-aware-profiles.test.cjs to `claude-opus-4-7` - Update comment on line 128 that referenced the old model ID - Replace manual per-tier expansion of RUNTIME_PROFILE_MAP.claude with Object.fromEntries so future alias bumps only require updating MODEL_ALIAS_MAP Co-Authored-By: Claude Sonnet 4.6 --------- Co-authored-by: Claude Sonnet 4.6 --- get-shit-done/bin/lib/core.cjs | 10 ++++------ tests/core.test.cjs | 18 ++++++++++++++++++ .../issue-2517-runtime-aware-profiles.test.cjs | 8 ++++---- tests/model-alias-map.test.cjs | 4 ++-- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/get-shit-done/bin/lib/core.cjs b/get-shit-done/bin/lib/core.cjs index 32f97c0fe..6b2167e50 100644 --- a/get-shit-done/bin/lib/core.cjs +++ b/get-shit-done/bin/lib/core.cjs @@ -1488,7 +1488,7 @@ function checkAgentsInstalled() { * Users can override with model_overrides in config.json for custom/latest models. */ const MODEL_ALIAS_MAP = { - 'opus': 'claude-opus-4-6', + 'opus': 'claude-opus-4-7', 'sonnet': 'claude-sonnet-4-6', 'haiku': 'claude-haiku-4-5', }; @@ -1506,11 +1506,9 @@ const MODEL_ALIAS_MAP = { * provider-specific IDs the runtime cannot accept. */ const RUNTIME_PROFILE_MAP = { - claude: { - opus: { model: 'claude-opus-4-6' }, - sonnet: { model: 'claude-sonnet-4-6' }, - haiku: { model: 'claude-haiku-4-5' }, - }, + claude: Object.fromEntries( + Object.entries(MODEL_ALIAS_MAP).map(([tier, model]) => [tier, { model }]) + ), codex: { opus: { model: 'gpt-5.4', reasoning_effort: 'xhigh' }, sonnet: { model: 'gpt-5.3-codex', reasoning_effort: 'medium' }, diff --git a/tests/core.test.cjs b/tests/core.test.cjs index 3d232de0a..1ad7d6879 100644 --- a/tests/core.test.cjs +++ b/tests/core.test.cjs @@ -379,6 +379,24 @@ describe('resolveModelInternal', () => { assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-planner'), ''); }); }); + + describe('resolve_model_ids: true', () => { + // Regression test for #2712: MODEL_ALIAS_MAP must track current model releases. + test('opus alias resolves to claude-opus-4-7', () => { + writeConfig({ resolve_model_ids: true, model_profile: 'quality' }); + assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-planner'), 'claude-opus-4-7'); + }); + + test('sonnet alias resolves to claude-sonnet-4-6', () => { + writeConfig({ resolve_model_ids: true, model_profile: 'balanced' }); + assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-executor'), 'claude-sonnet-4-6'); + }); + + test('haiku alias resolves to claude-haiku-4-5', () => { + writeConfig({ resolve_model_ids: true, model_profile: 'budget' }); + assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-codebase-mapper'), 'claude-haiku-4-5'); + }); + }); }); // ─── escapeRegex ─────────────────────────────────────────────────────────────── diff --git a/tests/issue-2517-runtime-aware-profiles.test.cjs b/tests/issue-2517-runtime-aware-profiles.test.cjs index b9c2ce9c2..e5a4e7691 100644 --- a/tests/issue-2517-runtime-aware-profiles.test.cjs +++ b/tests/issue-2517-runtime-aware-profiles.test.cjs @@ -90,7 +90,7 @@ describe('issue #2517: backwards compat — no runtime key set', () => { test('resolve_model_ids:true still maps alias -> full Claude ID with no runtime', () => { writeConfig(tmpDir, { model_profile: 'balanced', resolve_model_ids: true }); - assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-planner'), 'claude-opus-4-6'); + assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-planner'), 'claude-opus-4-7'); }); test('resolve_model_ids:"omit" still returns "" with no runtime', () => { @@ -125,7 +125,7 @@ describe('issue #2517: runtime "claude" is a no-op for resolution (finding #4)', test('runtime:"claude" + resolve_model_ids:"omit" returns "" (finding #4 regression)', () => { // The pre-fix bug: runtime:"claude" hijacked the resolution chain and - // returned `claude-opus-4-6` even when the user explicitly asked for the + // returned the resolved Claude ID even when the user explicitly asked for the // omit semantics. writeConfig(tmpDir, { runtime: 'claude', @@ -141,7 +141,7 @@ describe('issue #2517: runtime "claude" is a no-op for resolution (finding #4)', model_profile: 'quality', resolve_model_ids: true, }); - assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-planner'), 'claude-opus-4-6'); + assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-planner'), 'claude-opus-4-7'); }); test('reasoning_effort is null on Claude (never leaks)', () => { @@ -587,6 +587,6 @@ describe('issue #2517: RUNTIME_PROFILE_MAP single source of truth (finding #16)' const codexOpus = RUNTIME_PROFILE_MAP.codex?.opus; assert.deepStrictEqual(codexOpus, { model: 'gpt-5.4', reasoning_effort: 'xhigh' }); const claudeOpus = RUNTIME_PROFILE_MAP.claude?.opus; - assert.deepStrictEqual(claudeOpus, { model: 'claude-opus-4-6' }); + assert.deepStrictEqual(claudeOpus, { model: 'claude-opus-4-7' }); }); }); diff --git a/tests/model-alias-map.test.cjs b/tests/model-alias-map.test.cjs index 1e21960d6..85916bade 100644 --- a/tests/model-alias-map.test.cjs +++ b/tests/model-alias-map.test.cjs @@ -13,8 +13,8 @@ const assert = require('node:assert/strict'); const { MODEL_ALIAS_MAP } = require('../get-shit-done/bin/lib/core.cjs'); describe('MODEL_ALIAS_MAP (#1690 regression)', () => { - test('opus maps to claude-opus-4-6', () => { - assert.equal(MODEL_ALIAS_MAP.opus, 'claude-opus-4-6'); + test('opus maps to claude-opus-4-7', () => { + assert.equal(MODEL_ALIAS_MAP.opus, 'claude-opus-4-7'); }); test('sonnet maps to claude-sonnet-4-6', () => {