fix(anthropic): stop inventing (latest) display-name suffix in sync - #6434
Open
bharadwaj-pendyala wants to merge 1 commit into
Open
bharadwaj-pendyala wants to merge 1 commit into
bharadwaj-pendyala wants to merge 1 commit into
Conversation
Anthropic retired the alias model after 4.6: dateless IDs are now pinned snapshots, so every frozen pre-4.6 alias kept a permanent (latest) tag (Opus 4/4.1/4.5, Sonnet 4/4.5) while newer pinned models got none. Use the API display_name verbatim (stripping any stale suffix) instead of appending (latest) to every alias. This matches all other providers, where a rolling -latest pointer is owned upstream rather than hardcoded in names. Also sweeps the six stale canonical names. Supersedes anomalyco#6433.
Contributor
|
No actionable findings. |
Author
|
@rekram1-node this has been open since 6 September and it's still clean against dev. All six Anthropic names still carry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supersedes #6433 — root fix instead of data patch (close #6433 in favor of this).
buildAnthropicModelappended(latest)to every alias (canonical_idset). That was correct pre-4.6, but Anthropic froze old aliases and made 4.6+ dateless IDs pinned snapshots, so Opus 4/4.1/4.5 and Sonnet 4/4.5 kept a permanent(latest)tag while Opus 5 / Sonnet 5 got none. Same rot would repeat on every future release.Changes
packages/core/src/sync/providers/anthropic.ts: use the APIdisplay_nameverbatim, stripping any stale trailing(latest)— never invent the suffix. Matches all other providers, where a rolling-latestpointer is owned upstream.packages/core/test/sync.test.ts: replacedlabels Anthropic aliases as latestwithnever invents latest tags+strips stale latest suffix; updated inheritance mock name.Verification
(latest)inmodels/anthropic/.bun test/bun ./packages/core/script/validate.tsleft to CI (no bun locally).