Repository navigation
fix(models): list models.json models by name in the Models sidebar - #1408
Open
maximilize wants to merge 1 commit into
Open
maximilize wants to merge 1 commit into
maximilize wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
What
The model rows in Settings › Models list a models.json model by its
nameand fall back to itsid, as the model selector and the chat already do. A model without a name still shows its id, and a new row still shows "New model". The id stays in the model's editor.Why
In #885 the Web UI settled on showing model names: users set them in
models.json, while the id is fixed by the provider and often hard to read. The Models sidebar was the one place still showingm.id, so the same model read differently there than in the selector and the enabled-models list of the same panel.How
components/models-config-helpers.ts:modelSidebarLabel()returns the trimmed name, otherwise the id.components/ModelsConfig.tsx: the sidebar's model row uses it.components/ModelsConfig.test.mjs: name, missing name, blank name, new row.e2e/model-discovery.mjs: the relay fixture's model gets a name, and the check asserts the sidebar shows it. With theModelsConfig.tsxline reverted this assertion fails (0 !== 1).docs/agents/models.md: one sentence next to the selector note.Checks
npm test,node_modules/.bin/tsc --noEmit,npm run lint. In my container the same 5 tests fail on unchangedmainas on this branch (CLI and read-only dir cases, root user without network), the new test passes. Fornpm run test:e2ethe font metrics step and the/api/app-updaterequest need fonts and network the container lacks, so I ran it with that step skipped: the discovery check passes with the change and fails without it.🤖 Generated with Claude Code