Skip to content

fix(gui): use provider model names for web searchers - #715

Merged
yetone merged 2 commits into
yetone:mainfrom
hazukisendai:codex/searcher-model-names
Oct 3, 2026
Merged

yetone merged 2 commits into
yetone:mainfrom
hazukisendai:codex/searcher-model-names

Conversation

@hazukisendai

@hazukisendai hazukisendai commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

问题

Providers 里给模型设置的自定义名称,目前只在部分设置里生效。比如 Image recognition 会显示:

DeepSeek V4.1 Flash · xxxx

但 Settings → Web search 的“Searches for other models”仍显示原始模型 ID:

deepseek-flash · xxxx

同一个模型在不同设置区域的展示名不一致。

修改

  • Web search 的 searcher 显示名改为从 provider.Served() 读取,和 image recognition 使用同一套命名来源。
  • Automatic 和手动选择的 searcher 都会显示用户在 Providers 里设置的模型名。
  • searchChoices 新增 smallName 字段,用于 UI 展示;small 仍保存真实模型 ID,请求路由行为不变。
  • 更新了后端与 GUI 测试。

效果

修改前:

deepseek-flash · xxxx

修改后:

DeepSeek V4.1 Flash · xxxx

测试

  • git diff --check
  • 修改过的前端文件通过 node --check
  • TestSearcherChosen 覆盖 Searcher() 和 AutoSearcher() 的显示名
  • searcher-pick.test.cjs 覆盖 picker 展示与保存的选择

🎬 界面预览

CI 用这个 PR 的代码构建并真实运行 magpie(沙盒环境,配置了真实的 DeepSeek key),按改动自动操作、截图和录屏 · 5c6d9a0 · 运行记录

改动(按代码):改动让设置里「代搜供应商」的显示名改用供应商里给模型设的自定义名称:GUI 的 searchChoiceJSON 新增 smallName,模型选项名也改用 provider.Served() 里的名字,app.js 的选择器标签、供应商小模型选项以及选中后那一行的文字都优先显示这个名字,保存的仍是真实模型 ID。

Note

沙盒里看不到:只有「代搜供应商」列表非空、并且该供应商在 Providers 里给模型设过自定义名时,这次改动才看得见。沙盒里只有一个 DeepSeek 供应商:如果它不被算作代搜供应商(或没有配置任何代搜供应商),「代搜供应商」一节就是空的,选择器里的显示名与选中后那一行都无从出现,改动也就无法在现场展示。

播放录屏

▶️ 点图打开录屏(可暂停、拖动)· 直接下载 mp4 · 红线是鼠标轨迹,红色圆环是点击

设置里的「代搜供应商」

设置 · 模型标签页

设置 · 模型标签页

「代搜供应商」当前选中的显示名

「代搜供应商」当前选中的显示名

选择器里的显示名

选择器里的选项:自动,以及各供应商与其模型的名字

选择器里的选项:自动,以及各供应商与其模型的名字

选中之后,这一行显示的名字

选中之后,这一行显示的名字

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.
github-actions Bot added a commit that referenced this pull request Oct 3, 2026
…, as the en one does — the turned-off note reads 没有用 OpenAI · GPT-5 Mini Named now that the small model goes by its name
@yetone
yetone merged commit 8582815 into yetone:main Oct 3, 2026
1 check passed
@yetone

yetone commented Oct 3, 2026

Copy link
Copy Markdown
Owner

感谢 @hazukisendai,已合并!我拉下来合到当前 main 上跑了 go vet、三平台构建、全部 Go 测试和 searcher-pick 界面测试:中文那一项挂了,原因是测试里「已关闭」提示的预期还写着 gpt-5-mini,而改完后这里会显示模型名(没有用 OpenAI · GPT-5 Mini Named:它已关闭,和英文一致,行为是对的)。我在你的分支上补了这一行(5c6d9a0)后合并。会随下一个版本发布。

@yetone
yetone deployed to ui-preview October 3, 2026 20:04 — with GitHub Actions Active
github-actions Bot added a commit that referenced this pull request Oct 3, 2026
@yetone

yetone commented Oct 3, 2026

Copy link
Copy Markdown
Owner

已随 v0.1.785 发布。

This branch was successfully deployed

1 active deployment
ui-preview — 5c6d9a09 Deployed Oct 3, 2026 by yetone via record #446
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.

2 participants