feat(models): 增加模型显示名重命名#614
Merged
EKKOLearnAI merged 6 commits intoMay 11, 2026
Merged
Conversation
Persist display-only model aliases in Web UI app config, surface them in the model selector/search, and keep canonical model IDs for Hermes calls.
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.
为什么改
模型选择器展示的是 provider 返回的真实模型 ID。这个 ID 适合调用层,但日常识别不够友好;如果显示名、未列出的模型 ID、真实调用 ID 混在一起,用户也很难判断点选后实际调用哪个模型。
这个 PR 增加一个只影响界面展示的显示名层:可以把
deepseek-v4-flash显示成便宜,但切换模型和保存默认模型时仍然使用真实 provider + model ID。截图里test这类输入不是重命名功能,而是既有的“未列出的模型 ID”入口;这次把文案改清楚,并允许移除误加条目。范围
固定边界:
(provider, model)保存,只作用于界面侧 app config。明确不包含:
config.yaml里的 provider/model 真实 ID。改动
modelAliases,按 provider/model 保存界面专用显示名。PUT /api/hermes/model-alias,支持保存和清空显示名。/api/hermes/available-models返回model_aliases,并在模型 metadata 附带 alias。Display names管理入口。Rename/重命名文本。Custom model name/自定义模型名称改为Unlisted model ID/未列出的模型 ID,并同步其它 locale 的对应文案,说明它不是重命名。test)现在可以从 picker 里移除;如果正在使用,会回退到同 provider 的已列出模型。验证
npm test -- --run tests/client/app-store.test.ts tests/server/model-alias-controller.test.ts:通过,12 testsnpx vue-tsc -b:通过npx tsc --noEmit -p packages/server/tsconfig.json:通过npm run build:通过备注
“未列出的模型 ID”入口不是本 PR 新增;它原本用于手动加载 provider 支持但列表没返回的模型。之前文案像“自定义模型名称”,容易被误解成显示名功能,所以这次一起收敛文案和删除能力。