Skip to content

Commit 7c2d36f

Browse files
authored
Distinguish gpt-5.3-codex-spark from base GPT-5.3 Codex label (#539)
gpt-5.3-codex-spark is a distinct model variant, but the longest-first startsWith(key+'-') matcher (intended for reasoning suffixes -high/-low) swept it into the base 'GPT-5.3 Codex' label, making a distinct model look like the retired base in today/models/status output. Add an explicit display entry in SHORT_NAMES and the codex provider so the longer key wins; -high/-low still fall through to the base. Pricing is unaffected (LiteLLM has no spark entry; cost falls back to the base rate as before). Fixes #461
1 parent 102ce73 commit 7c2d36f

4 files changed

Lines changed: 29 additions & 0 deletions

File tree

src/models.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,7 @@ const SHORT_NAMES: Record<string, string> = {
621621
'gpt-5.4-nano': 'GPT-5.4 Nano',
622622
'gpt-5.4-mini': 'GPT-5.4 Mini',
623623
'gpt-5.4': 'GPT-5.4',
624+
'gpt-5.3-codex-spark': 'GPT-5.3 Codex Spark',
624625
'gpt-5.3-codex': 'GPT-5.3 Codex',
625626
'gpt-5.3': 'GPT-5.3',
626627
'gpt-5.2-pro': 'GPT-5.2 Pro',

src/providers/codex.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const modelDisplayNames: Record<string, string> = {
1616
'gpt-5.5': 'GPT-5.5',
1717
'gpt-5.4-mini': 'GPT-5.4 Mini',
1818
'gpt-5.4': 'GPT-5.4',
19+
'gpt-5.3-codex-spark': 'GPT-5.3 Codex Spark',
1920
'gpt-5.3-codex': 'GPT-5.3 Codex',
2021
'gpt-5.2-low': 'GPT-5.2 Low',
2122
'gpt-5.2': 'GPT-5.2',

tests/models.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ describe('getShortModelName', () => {
5151
expect(getShortModelName('gpt-5.4-mini')).toBe('GPT-5.4 Mini')
5252
})
5353

54+
// Regression for #461: spark is a distinct variant, not a reasoning suffix.
55+
it('maps gpt-5.3-codex-spark to its own label (not GPT-5.3 Codex)', () => {
56+
const name = getShortModelName('gpt-5.3-codex-spark')
57+
expect(name).not.toBe('GPT-5.3 Codex')
58+
expect(name).toBe('GPT-5.3 Codex Spark')
59+
})
60+
61+
it('maps gpt-5.3-codex reasoning suffixes to the base label', () => {
62+
expect(getShortModelName('gpt-5.3-codex-high')).toBe('GPT-5.3 Codex')
63+
expect(getShortModelName('gpt-5.3-codex-low')).toBe('GPT-5.3 Codex')
64+
})
65+
5466
it('maps claude-opus-4-6 with date suffix', () => {
5567
expect(getShortModelName('claude-opus-4-6-20260205')).toBe('Opus 4.6')
5668
})

tests/providers/codex.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,21 @@ async function writeSession(dir: string, date: string, filename: string, lines:
105105
return filePath
106106
}
107107

108+
describe('codex provider - model display names', () => {
109+
it('maps gpt-5.3-codex-spark to its own label', () => {
110+
const provider = createCodexProvider(tmpDir)
111+
const name = provider.modelDisplayName('gpt-5.3-codex-spark')
112+
expect(name).not.toBe('GPT-5.3 Codex')
113+
expect(name).toBe('GPT-5.3 Codex Spark')
114+
})
115+
116+
it('maps gpt-5.3-codex reasoning suffixes to the base label', () => {
117+
const provider = createCodexProvider(tmpDir)
118+
expect(provider.modelDisplayName('gpt-5.3-codex-high')).toBe('GPT-5.3 Codex')
119+
expect(provider.modelDisplayName('gpt-5.3-codex-low')).toBe('GPT-5.3 Codex')
120+
})
121+
})
122+
108123
describe('codex provider - session discovery', () => {
109124
it('discovers sessions in YYYY/MM/DD structure', async () => {
110125
await writeSession(tmpDir, '2026-04-14', 'rollout-abc123.jsonl', [

0 commit comments

Comments
 (0)