Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ const SHORT_NAMES: Record<string, string> = {
'gpt-5.4-nano': 'GPT-5.4 Nano',
'gpt-5.4-mini': 'GPT-5.4 Mini',
'gpt-5.4': 'GPT-5.4',
'gpt-5.3-codex-spark': 'GPT-5.3 Codex Spark',
'gpt-5.3-codex': 'GPT-5.3 Codex',
'gpt-5.3': 'GPT-5.3',
'gpt-5.2-pro': 'GPT-5.2 Pro',
Expand Down
1 change: 1 addition & 0 deletions src/providers/codex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const modelDisplayNames: Record<string, string> = {
'gpt-5.5': 'GPT-5.5',
'gpt-5.4-mini': 'GPT-5.4 Mini',
'gpt-5.4': 'GPT-5.4',
'gpt-5.3-codex-spark': 'GPT-5.3 Codex Spark',
'gpt-5.3-codex': 'GPT-5.3 Codex',
'gpt-5.2-low': 'GPT-5.2 Low',
'gpt-5.2': 'GPT-5.2',
Expand Down
12 changes: 12 additions & 0 deletions tests/models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ describe('getShortModelName', () => {
expect(getShortModelName('gpt-5.4-mini')).toBe('GPT-5.4 Mini')
})

// Regression for #461: spark is a distinct variant, not a reasoning suffix.
it('maps gpt-5.3-codex-spark to its own label (not GPT-5.3 Codex)', () => {
const name = getShortModelName('gpt-5.3-codex-spark')
expect(name).not.toBe('GPT-5.3 Codex')
expect(name).toBe('GPT-5.3 Codex Spark')
})

it('maps gpt-5.3-codex reasoning suffixes to the base label', () => {
expect(getShortModelName('gpt-5.3-codex-high')).toBe('GPT-5.3 Codex')
expect(getShortModelName('gpt-5.3-codex-low')).toBe('GPT-5.3 Codex')
})

it('maps claude-opus-4-6 with date suffix', () => {
expect(getShortModelName('claude-opus-4-6-20260205')).toBe('Opus 4.6')
})
Expand Down
15 changes: 15 additions & 0 deletions tests/providers/codex.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,21 @@ async function writeSession(dir: string, date: string, filename: string, lines:
return filePath
}

describe('codex provider - model display names', () => {
it('maps gpt-5.3-codex-spark to its own label', () => {
const provider = createCodexProvider(tmpDir)
const name = provider.modelDisplayName('gpt-5.3-codex-spark')
expect(name).not.toBe('GPT-5.3 Codex')
expect(name).toBe('GPT-5.3 Codex Spark')
})

it('maps gpt-5.3-codex reasoning suffixes to the base label', () => {
const provider = createCodexProvider(tmpDir)
expect(provider.modelDisplayName('gpt-5.3-codex-high')).toBe('GPT-5.3 Codex')
expect(provider.modelDisplayName('gpt-5.3-codex-low')).toBe('GPT-5.3 Codex')
})
})

describe('codex provider - session discovery', () => {
it('discovers sessions in YYYY/MM/DD structure', async () => {
await writeSession(tmpDir, '2026-04-14', 'rollout-abc123.jsonl', [
Expand Down
Loading