Repository navigation
fix(ui): display model name instead of id in statusline and startup banner #4741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
cb4e91c
fcfc092
6e2166f
97043fd
5aa35e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2199,6 +2199,16 @@ export class Config { | |
| ); | ||
| } | ||
|
|
||
| /** | ||
| * Get the human-readable display name for the currently selected model. | ||
| * Resolves the model id to its name from the model registry. | ||
| * Falls back to the raw model id when the model is not found. | ||
| */ | ||
| getModelDisplayName(): string { | ||
| const modelId = this.getModel(); | ||
| return modelId ? this.modelsConfig.getModelDisplayName(modelId) : 'unknown'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] The This creates a misleading impression that a "no model" scenario is handled when it cannot actually occur. Consider either simplifying to — qwen3.7-max via Qwen Code /review |
||
| } | ||
|
|
||
| onModelChange(listener: (model: string) => void): () => void { | ||
| this.modelChangeListeners.add(listener); | ||
| return () => { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -312,6 +312,18 @@ export class ModelsConfig { | |
| return this.modelRegistry.getModel(authType, modelId); | ||
| } | ||
|
|
||
| /** | ||
| * Get the display name for a model by its id. | ||
| * Looks up the model in the registry using the current authType and returns | ||
| * its resolved name. Falls back to the raw model id when the model is not | ||
| * found in the registry (e.g. runtime models or unknown models). | ||
| */ | ||
| getModelDisplayName(modelId: string): string { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] Three branches in this method are uncovered: (1) model found in registry → returns Consider adding — qwen3.7-max via Qwen Code /review |
||
| if (!this.currentAuthType) return modelId; | ||
| const resolved = this.modelRegistry.getModel(this.currentAuthType, modelId); | ||
| return resolved?.name ?? modelId; | ||
| } | ||
|
|
||
| /** | ||
| * Set model programmatically (e.g., VLM auto-switch, fallback). | ||
| * Supports both registry models and raw model IDs. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.