Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ const BUILTIN_ALIASES: Record<string, string> = {
// reports that quote literal slugs (e.g. forum.cursor.com/t/154933).
'claude-4-sonnet': 'claude-sonnet-4',
'claude-4-sonnet-1m': 'claude-sonnet-4',
'claude-4-sonnet-thinking': 'claude-sonnet-4-5',
'claude-4-sonnet-thinking': 'claude-sonnet-4',
'claude-4.5-sonnet': 'claude-sonnet-4-5',
'claude-4.5-sonnet-thinking': 'claude-sonnet-4-5',
'claude-4.6-sonnet': 'claude-sonnet-4-6',
Expand Down
10 changes: 9 additions & 1 deletion tests/models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ describe('Cursor model variants resolve to pricing', () => {
// Sonnet family
['claude-4-sonnet', 'claude-sonnet-4'],
['claude-4-sonnet-1m', 'claude-sonnet-4'],
['claude-4-sonnet-thinking', 'claude-sonnet-4-5'],
['claude-4-sonnet-thinking', 'claude-sonnet-4'],
['claude-4.5-sonnet', 'claude-sonnet-4-5'],
['claude-4.5-sonnet-thinking', 'claude-sonnet-4-5'],
['claude-4.6-sonnet', 'claude-sonnet-4-6'],
Expand Down Expand Up @@ -558,6 +558,14 @@ describe('Cursor model variants resolve to pricing', () => {
expect(costs!.outputCostPerToken).toBe(expected!.outputCostPerToken)
})
}

// Regression for #912: Cursor's unversioned `claude-4-sonnet-thinking`
// slug is the thinking variant of Sonnet 4, not Sonnet 4.5. The two models
// currently share a price, so the display name pins the canonical identity
// independently of today's pricing coincidence.
it('keeps claude-4-sonnet-thinking in the Sonnet 4 model family', () => {
expect(getShortModelName('claude-4-sonnet-thinking')).toBe('Sonnet 4')
})
})

describe('Cursor house model pricing', () => {
Expand Down
Loading