Skip to content

fix(models): keep claude-4-sonnet-thinking in the Sonnet 4 family - #982

Merged
ozymandiashh merged 1 commit into
getagentseal:mainfrom
avs-io:codex/issue-912-model-alias
Aug 18, 2026
Merged

ozymandiashh merged 1 commit into
getagentseal:mainfrom
avs-io:codex/issue-912-model-alias

Conversation

@avs-io

@avs-io avs-io commented Aug 12, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Cursor's unversioned claude-4-sonnet-thinking slug was aliased to claude-sonnet-4-5, even though it identifies the thinking variant of Sonnet 4.

This is easy to miss today because Sonnet 4 and Sonnet 4.5 currently have identical rates. The incorrect identity nevertheless surfaces the wrong model name and could become a pricing error if those rates diverge.

Change

  • map claude-4-sonnet-thinking to claude-sonnet-4
  • update the Cursor alias regression table
  • add an independent display-name assertion that pins the model identity even while the two models share pricing

User impact

Cursor sessions using this slug now appear under Sonnet 4 rather than Sonnet 4.5 and remain attached to the correct pricing family.

Validation

  • npx vitest run tests/models.test.ts — 154 passed
  • npm test — 2,617 passed, 5 skipped
  • npm run test:locks — 26 passed
  • npx tsc --noEmit
  • npm run build:cli
  • npm --prefix dash run build
  • runtime probe resolves the slug to Sonnet 4

Addresses the confirmed model-alias finding in #912.

@ozymandiashh ozymandiashh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, and the repo corroborates it without needing to consult anything external: src/providers/cursor.ts:33 and src/providers/cursor-agent.ts:58 already render this slug as "Sonnet 4 (Thinking)", with claude-4.5-sonnet-thinking as a separate "Sonnet 4.5 (Thinking)" entry — pinned by tests/providers/cursor.test.ts:31. The provider display maps and the alias table disagreed, and this makes them agree.

It also removes the last inconsistent row in that table. Every dot-versioned slug carries its version through (claude-4.5-sonnet-thinking → claude-sonnet-4-5, claude-4.6-sonnet-thinking → claude-sonnet-4-6), and the unversioned claude-4-sonnet / claude-4-sonnet-1m already resolved to claude-sonnet-4. This row was the only one where a suffix quietly promoted a model to a different minor version — same bug class as claude-4-opus, which came from the same original commit and was corrected in #290.

The impact is more than cosmetic: src/parser.ts keys modelBreakdown off getShortModelName, so a Cursor user running both Sonnet 4 Thinking and Sonnet 4.5 had the two collapsed into one "Sonnet 4.5" row in the overview, menubar and sessions breakdowns.

Good call adding the standalone display-name assertion. The parametrized pricing row can't catch this on its own while the two models share rates in the snapshot, so that extra assertion is the only thing actually pinning the identity — and the comment says so, which is what makes it maintainable.

One pre-existing gap this doesn't touch, just noting it so it isn't a surprise: already-finalized days in the daily cache stay bucketed under the old name. getDailyCacheConfigHash is composed only of the local-savings and price-override hashes, and getModelAliasesConfigHash deliberately excludes the builtin table, so nothing invalidates history when BUILTIN_ALIASES changes. Today's numbers are right immediately; older days re-bucket only when their cache is otherwise re-derived. Not a reason to hold this.

@ozymandiashh
ozymandiashh merged commit eadc99e into getagentseal:main Aug 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants