fix(gui): use provider model names for web searchers - #715
Merged
Merged
Conversation
Settings web search reads the names given in Providers from provider.Served, the same source as image recognition, so Automatic and a named searcher show those names instead of bare model IDs. Tests cover both.
…, as the en one does — the turned-off note reads 没有用 OpenAI · GPT-5 Mini Named now that the small model goes by its name
Owner
|
感谢 @hazukisendai,已合并!我拉下来合到当前 main 上跑了 go vet、三平台构建、全部 Go 测试和 searcher-pick 界面测试:中文那一项挂了,原因是测试里「已关闭」提示的预期还写着 |
Owner
|
已随 v0.1.785 发布。 |
This branch was successfully 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.
问题
Providers 里给模型设置的自定义名称,目前只在部分设置里生效。比如 Image recognition 会显示:
但 Settings → Web search 的“Searches for other models”仍显示原始模型 ID:
同一个模型在不同设置区域的展示名不一致。
修改
provider.Served()读取,和 image recognition 使用同一套命名来源。Automatic和手动选择的 searcher 都会显示用户在 Providers 里设置的模型名。searchChoices新增smallName字段,用于 UI 展示;small仍保存真实模型 ID,请求路由行为不变。效果
修改前:
修改后:
测试
git diff --checknode --checkTestSearcherChosen覆盖Searcher()和AutoSearcher()的显示名searcher-pick.test.cjs覆盖 picker 展示与保存的选择🎬 界面预览
CI 用这个 PR 的代码构建并真实运行 magpie(沙盒环境,配置了真实的 DeepSeek key),按改动自动操作、截图和录屏 ·
5c6d9a0· 运行记录改动(按代码):改动让设置里「代搜供应商」的显示名改用供应商里给模型设的自定义名称:GUI 的 searchChoiceJSON 新增 smallName,模型选项名也改用 provider.Served() 里的名字,app.js 的选择器标签、供应商小模型选项以及选中后那一行的文字都优先显示这个名字,保存的仍是真实模型 ID。
Note
沙盒里看不到:只有「代搜供应商」列表非空、并且该供应商在 Providers 里给模型设过自定义名时,这次改动才看得见。沙盒里只有一个 DeepSeek 供应商:如果它不被算作代搜供应商(或没有配置任何代搜供应商),「代搜供应商」一节就是空的,选择器里的显示名与选中后那一行都无从出现,改动也就无法在现场展示。
设置里的「代搜供应商」
设置 · 模型标签页
「代搜供应商」当前选中的显示名
选择器里的显示名
选择器里的选项:自动,以及各供应商与其模型的名字
选中之后,这一行显示的名字