fix(ui): model pill shows bare family name for single-segment versions (opus-5) - #2074
Open
sadpandajoe wants to merge 1 commit into
Open
fix(ui): model pill shows bare family name for single-segment versions (opus-5)#2074sadpandajoe wants to merge 1 commit into
sadpandajoe wants to merge 1 commit into
Conversation
…s (opus-5) Refactor getModelDisplayName into a single family loop that matches an optional minor segment, so single-segment ids (claude-opus-5) render as opus-5 while preserving major.minor (claude-opus-4-8 -> opus-4.8). Adds fable to the handled families and covers all cases with a unit test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
The model pill in the message/session UI showed a bare family name (e.g.
opus) instead of the versioned name when a single-segment model version was selected. The per-family regexes ingetModelDisplayNamerequired two version segments (opus-(\d)-(\d)), so ids likeclaude-opus-5/claude-sonnet-5fell through to the bare fallback, andclaude-fable-5(no branch at all) returned the raw id.Before / After
claude-opus-5opusopus-5claude-sonnet-5sonnetsonnet-5claude-fable-5claude-fable-5fable-5claude-opus-4-8opus-4.8opus-4.8(unchanged)Fix
opus,sonnet,haiku,fable).-(\d+)(?:-(\d+))?→ rendersopus-5with no minor,opus-4.8with one. Two-segment behavior is preserved exactly.[1m]don't break matching.modelDisplay.test.tscovering all cases.Verification
vitest runonmodelDisplay.test.ts— 5 passedbiome check+ typecheck on touched files — clean🤖 Generated with Claude Code