Repository navigation
fix: recognise the Claude 5 generation in History (Opus 5, Sonnet 5) - #263
Merged
Merged
Conversation
claude-opus-5 was absorbed by the bare-opus fallback and labeled Opus 4.8 (#259); claude-sonnet-5 collapsed into the unversioned legacy Sonnet bucket (#261). Third iteration of the unknown-model-ID pattern after #188 and #199. - ModelKind: new opus5 and sonnet5 cases, matched before the 4.x checks and the generic buckets; the bare opus alias now maps to Opus 5 (the current shipping version, as its comment always promised). - History chart: distinct colors for both new cases; the family chips are untouched (Opus 5 folds into Opus, Sonnet 5 into Sonnet). - HistoryCache schema bumped to v3 so already-parsed history is re-scanned and reclassified, same mechanism as the Fable bump (#199).
…he discard Review hardening: an unrecognised 4.x minor (e.g. claude-opus-4-5) now stays labeled Opus 4.8 instead of being absorbed by the bare-opus fallback into the Opus 5 bucket; the cache-version discard the whole reclassification relies on is now expressed as HistoryCache .isCurrentVersion and pinned by tests; the v3 comment states the accepted side effect (legacy bare-opus rows relabel to Opus 5).
2 of 3 tasks
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.
Fixes #259 and #261. Third iteration of the unknown-model-ID pattern (#188 fixed by #189, #199 fixed by #201): the Claude 5 generation drops the minor version suffix, so
claude-opus-5was absorbed by the bare-opus fallback and labeled Opus 4.8, andclaude-sonnet-5collapsed into the unversioned legacy Sonnet bucket.Changes
ModelKind: newopus5andsonnet5cases, matched before the 4.x checks and the generic buckets (opus-4-5/sonnet-4-5cannot collide with theopus-5/sonnet-5substrings, pinned by tests). An unrecognised 4.x minor now stays labeled Opus 4.8 instead of falling into the Opus 5 bucket. The bareopusalias maps to Opus 5, the current shipping version, as its comment always promised.topActiveModelNamepick the fix up automatically.HistoryCacheschema bumped to v3 so already-parsed history is re-scanned and reclassified on first open, same mechanism as the Fable bump (History view classifies claude-fable-5 sessions as "Other" #199). The discard path is now expressed asHistoryCache.isCurrentVersionand pinned by a new test suite.Accepted side effect
Legacy rows whose JSONL says just
opusrelabel from Opus 4.8 to Opus 5 in the re-scan: the bare alias carries no era information, and the fallback tracks the current shipping version by design. Called out in the v3 comment.Tests
642 tests, 67 suites green, including new pins:
opus5IsRecognised,sonnet5IsRecognised,unknownOpus4MinorStaysInGeneration4, the retargeted bare-alias test, the sonnet-4-5 non-collision guard, and the previously untested cache-version discard.