Models:支持在 Web UI 里管理可见模型#613
Merged
EKKOLearnAI merged 2 commits intoMay 11, 2026
Merged
Conversation
Store provider model visibility in Web UI app config and filter the WUI model picker/model page without rewriting Hermes CLI config or canonical model IDs.
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.
这次改动支持在 Web UI 里管理模型的显示状态:用户可以按 provider 勾选哪些模型出现在侧边栏选择器和 Models 页面里。它只改“哪些模型显示出来”,不改 Hermes CLI/provider 配置,也不改实际请求里使用的 canonical model id。
为什么
现在一个 provider 可能一次暴露很多模型,选择器和 Models 页面会变得很吵。这里想解决的是“常用模型更好找”,不是做模型权限封禁。
所以过滤规则放在 Web UI 的 AppConfig 里。隐藏模型只影响页面展示;真正调用模型时,仍然走 Hermes 原来的 provider/model id。这样可以把列表收窄,但不会让 Web UI 的显示偏好影响 CLI 默认模型或 provider 配置。
边界
这次固定的是 UI 展示层:模型可以被隐藏、恢复;默认模型如果被隐藏,页面只在可见列表里找一个能显示的 fallback。这个 fallback 不写回 Hermes CLI 配置,也不阻止用户手动输入 custom model id。
改动
modelVisibility,按 provider 保存all/include可见性规则。PUT /api/hermes/model-visibility,只写 Web UI app config,不调用writeConfigYaml。/api/hermes/available-models返回过滤后的groups,同时保留available_models未过滤全集,供管理弹窗恢复被隐藏模型。model_visibility/available_models;默认模型被隐藏时回落到首个可见模型,但不写回 Hermes CLI 默认配置。available-models响应同步回侧边栏 store,避免新勾选模型只出现在卡片、不出现在选择器。include规则里的模型都已经不存在,则回到 provider 原始全集,避免用户因为规则过期看不到模型、也找不到恢复入口。验证
已通过:
结果:相关测试 11/11 通过,build 通过;仅有现有 chunk size warning。
已知: