Skip to content

fix: preserve model group labels#14806

Open
404-Page-Found wants to merge 2 commits into
CherryHQ:mainfrom
404-Page-Found:The-model-list-displays-grouped-garbled-text
Open

fix: preserve model group labels#14806
404-Page-Found wants to merge 2 commits into
CherryHQ:mainfrom
404-Page-Found:The-model-list-displays-grouped-garbled-text

Conversation

@404-Page-Found
Copy link
Copy Markdown
Contributor

What this PR does

Before this PR:
Model list group headers could show raw provider-style slugs, and a generic formatter could also mangle canonical family ids like gpt-5 and gpt-image.

After this PR:
Model list group labels are normalized conservatively: known provider slugs are rendered with friendly names, while canonical family ids remain unchanged.

Fixes #14362

Why we need it and why it was done in this way

The following tradeoffs were made:

  • Only explicit provider-style aliases are humanized, so valid model family ids are preserved.
  • The shared label helper is reused in both model list views to keep the display behavior consistent.

The following alternatives were considered:

  • Title-casing every slug-like group, which would fix some raw provider names but break valid family labels like gpt-5.
  • Leaving the raw group string everywhere, which would preserve correctness but keep the original garbled labels.

Links to places where the discussion took place:

Breaking changes

None.

Special notes for your reviewer

Verified with pnpm exec vitest run src/renderer/src/utils/__tests__/model.test.ts.

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note

Normalize model group labels so known provider slugs render cleanly while preserving canonical model family ids like gpt-5 and gpt-image.

Signed-off-by: 404-Page-Found <Lucas20220605@gmail.com>
@404-Page-Found
Copy link
Copy Markdown
Contributor Author

404-Page-Found commented May 3, 2026

Note

This comment was translated by Claude.

Adding the latest feedback on issue #14362: The user who reported the bug confirmed that this issue still reproduces in version 1.9.4, and it not only affects the model group display but also further affects model invocation, making it a functional regression issue.


Original Content

补充一下 issue #14362 的最新反馈:提 bug 的用户确认在 1.9.4 版本里这个问题仍然复现,而且它不仅影响模型分组显示,还会进一步影响模型调用,属于功能性回归问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: The model list displays grouped garbled text.

2 participants