fix(tui): disambiguate /model picker rows when provider display names collide#12306
Merged
Conversation
… collide If the gateway returns two providers that resolve to the same display name (e.g. `kimi-coding` and `kimi-coding-cn` both → "Kimi For Coding"), the picker now appends the slug so users can tell them apart, in both the provider list and the selected-provider header. No-op when names are already unique. Refs #10526 — the Python backend dedupe from #10599 skips one alias, but user-defined providers, canonical overlays, and future regressions can still surface as indistinguishable rows in the picker. This is a client-side safety net on top of that.
19 tasks
man209111-cpu
pushed a commit
to man209111-cpu/hermes-agent
that referenced
this pull request
Apr 18, 2026
…picker-dedupe-names fix(tui): disambiguate /model picker rows when provider display names collide
2 tasks
ulasbilgen
pushed a commit
to ulasbilgen/hermes-adhd-agent
that referenced
this pull request
May 1, 2026
…picker-dedupe-names fix(tui): disambiguate /model picker rows when provider display names collide
aj-nt
pushed a commit
to aj-nt/hermes-agent
that referenced
this pull request
May 1, 2026
…picker-dedupe-names fix(tui): disambiguate /model picker rows when provider display names collide
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…picker-dedupe-names fix(tui): disambiguate /model picker rows when provider display names collide
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…picker-dedupe-names fix(tui): disambiguate /model picker rows when provider display names collide
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…picker-dedupe-names fix(tui): disambiguate /model picker rows when provider display names collide
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 does this PR do?
Defensive UX fix in the TS Ink
/modelpicker: when two providers render with the same display name (e.g.kimi-codingandkimi-coding-cnboth → "Kimi For Coding"), both rows now get their slug appended —Kimi For Coding (kimi-coding)vsKimi For Coding (kimi-coding-cn)— so users can actually distinguish them. Same disambiguation is applied to the header of the "Select Model" stage so the selected provider label stays unambiguous. No-op when names are already unique.The Python backend already dedupes Kimi-style aliases by skipping one (#10599 landed that for #10526), but that's "first-with-credentials wins" — a user with both sets of credentials only sees one. User-defined providers from
config.yaml,CANONICAL_PROVIDERSoverlays, and any future backend regression can still surface as two rows with identical labels. This is a tiny client-side safety net that makes the picker resilient instead of trusting the gateway to be perfect.Related Issue
Refs #10526
Type of Change
Changes Made
ui-tui/src/domain/providers.ts— new pure helperproviderDisplayNames(providers). Single pass to count name occurrences, second pass to append(slug)to members of any group with count > 1. Falls back to the plain name when slug is empty or equal to the display name.ui-tui/src/components/modelPicker.tsx— compute disambiguated names once viauseMemo, use them for both the provider-list rows and the selected-provider header on the model-selection stage.ui-tui/src/__tests__/providers.test.ts— 7 unit tests: unique names untouched, collisions disambiguated symmetrically, non-colliding groups unaffected, empty-slug fallback, slug-equals-name edge case, empty input, order preservation.How to Test
cd ui-tui && npm install && npm run test— 80 tests pass (7 new).npm run type-check— clean.npm run lint— no new errors on touched files.kimi-codingandkimi-coding-cnconfigured, run/modeland confirm the picker showsKimi For Coding (kimi-coding)andKimi For Coding (kimi-coding-cn)instead of two identical rows. With only one set of credentials, the backend dedupe still wins and the single row shows justKimi For Coding(no slug suffix since there's no collision).Tested on: Ubuntu 24.04 (WSL2), Node v22.22.2.
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -q— N/A, TS-only change;npm run testinui-tui/passes (80/80)Documentation & Housekeeping
cli-config.yaml.example— N/ACONTRIBUTING.mdorAGENTS.md— N/AScreenshots / Logs
Before (per #10526):
After: