Skip to content

Commit b470c6d

Browse files
authored
feat(adapters): add GPT-5.6 (sol/terra/luna) to Codex OAuth model catalog (#274)
Verified against a live account's ~/.codex/models_cache.json (2026-07-10): gpt-5.6-sol/terra/luna are the new priority-1/2/3 tiers, replacing the -codex suffix naming. Adds them to DEFAULT_CODEX_MODELS (offline fallback) and FORWARD_COMPAT_TEMPLATES (synthesize the newer slug when a compatible legacy tier is detected). Scope intentionally limited to the discovery catalog — gpt-5-codex/gpt-5.3-codex stay in the fallback since a single account's live cache isn't confirmation the backend rejects them fleet-wide. INT-2622
1 parent 532c500 commit b470c6d

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

src/adapters/codexModels.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,23 @@ describe('addForwardCompatModels', () => {
2121
it('does not synthesize when no template matches', () => {
2222
expect(addForwardCompatModels(['gpt-5-codex'])).toEqual(['gpt-5-codex']);
2323
});
24+
25+
it('tiers the gpt-5.6 family: sol synthesizes from any legacy signal (mirrors gpt-5.5), terra/luna are narrower', () => {
26+
// gpt-5.4-mini alone: broad net (sol, mirroring gpt-5.5's old template) + the matching
27+
// narrow tier (luna); terra requires 5.4/5.5 specifically, so it's absent here.
28+
expect(addForwardCompatModels(['gpt-5.4-mini'])).toEqual([
29+
'gpt-5.4-mini',
30+
'gpt-5.6-sol',
31+
'gpt-5.6-luna',
32+
'gpt-5.5',
33+
]);
34+
// gpt-5.4 alone: sol + terra synthesize; luna needs gpt-5.4-mini specifically, so it's absent.
35+
expect(addForwardCompatModels(['gpt-5.4'])).toEqual(['gpt-5.4', 'gpt-5.6-sol', 'gpt-5.6-terra', 'gpt-5.5']);
36+
const fromCodex = addForwardCompatModels(['gpt-5.3-codex']);
37+
expect(fromCodex).toContain('gpt-5.6-sol');
38+
expect(fromCodex).not.toContain('gpt-5.6-terra');
39+
expect(fromCodex).not.toContain('gpt-5.6-luna');
40+
});
2441
});
2542

2643
describe('getCodexModelIds — offline sources', () => {

src/adapters/codexModels.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,20 @@ const FETCH_TIMEOUT_MS = 10_000;
2929
* hermes) are deliberately excluded so the picker never leaks a model selection
3030
* will reject. Live discovery (the primary path when authenticated) overrides
3131
* this list entirely.
32+
*
33+
* GPT-5.6 (sol/terra/luna) launched with a new naming scheme (no `-codex`
34+
* suffix), verified against a live account's ~/.codex/models_cache.json on
35+
* 2026-07-10 (priority 1/2/3, ahead of gpt-5.5). That live cache no longer
36+
* listed gpt-5-codex or gpt-5.3-codex, but this is a single account's
37+
* snapshot, not confirmation the backend rejects them fleet-wide (unlike the
38+
* gpt-5.2-codex/etc slugs above, which were verified dead) — both stay in the
39+
* fallback until that's independently confirmed.
3240
*/
3341
export const DEFAULT_CODEX_MODELS: string[] = [
3442
'gpt-5-codex',
43+
'gpt-5.6-sol',
44+
'gpt-5.6-terra',
45+
'gpt-5.6-luna',
3546
'gpt-5.5',
3647
'gpt-5.4',
3748
'gpt-5.4-mini',
@@ -47,6 +58,9 @@ export const DEFAULT_CODEX_MODELS: string[] = [
4758
* present (mirrors Clawdbot's forward-compat catalog for GPT-5 Codex variants).
4859
*/
4960
const FORWARD_COMPAT_TEMPLATES: Array<[synthetic: string, templates: string[]]> = [
61+
['gpt-5.6-sol', ['gpt-5.5', 'gpt-5.4', 'gpt-5.4-mini', 'gpt-5.3-codex']],
62+
['gpt-5.6-terra', ['gpt-5.5', 'gpt-5.4']],
63+
['gpt-5.6-luna', ['gpt-5.4-mini']],
5064
['gpt-5.5', ['gpt-5.4', 'gpt-5.4-mini', 'gpt-5.3-codex']],
5165
['gpt-5.4-mini', ['gpt-5.3-codex']],
5266
['gpt-5.4', ['gpt-5.3-codex']],

0 commit comments

Comments
 (0)