Skip to content

fix(composer): display configured model context limits - #1494

Open
zszz3 wants to merge 9 commits into
vastsa:mainfrom
zszz3:codex/fix-model-context-1484
Open

zszz3 wants to merge 9 commits into
vastsa:mainfrom
zszz3:codex/fix-model-context-1484

Conversation

@zszz3

@zszz3 zszz3 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

问题与修改

高级设置保存 500K 后,聊天框模型列表仍显示目录中的 1M。composerModelsForProvider() 原先直接复制发现数据,漏掉了对应 binding 的自定义额度。

本次复用现有 effectiveContextWindow():手动设置优先,目录继承值继续跟随目录,缺少发现数据时仍显示有效的已保存额度。核心改动仅一个函数(+10/-1),另同步行为说明和手动验证场景;不修改运行时预算、自动压缩阈值或存储格式。

验证

  • 现有 composer-models / context-usage 测试:33 项通过。
  • 最新上游基线上的 Electron Composer 模型切换交互检查通过。
  • 桌面源码类型检查、样式检查、桌面构建及差异检查通过。本地复用主工作区依赖;类型检查和构建使用临时配置指向当前工作树的 workspace 源码,避免旧 dist 干扰,临时配置未提交。
  • 修复后的 macOS 开发客户端实测:500K、256K、自定义 333333(显示 333.3K)、取消修改、重启恢复、重新获取模型列表,显示均符合预期。目录默认 1M 时,菜单保留自定义 500K。
  • 按任务要求未新增回归测试文件。Windows / space-bunny 和 500K 满载压缩未实测;此次客户端显示验证使用隔离配置及本地模型列表服务。

Task candidate: 9e51902490db193089ae82e3d99dfab1c6ea6673
Base main: 9f6aaa2c29c824d6d424f1b021e1994ebb5ef769

Fixes #1484

zszz3 and others added 9 commits October 8, 2026 22:25
Resolve model list context labels with the existing binding precedence so user overrides remain visible alongside catalog metadata and without discovery.

fixes vastsa#1484
The configured context limit can differ from the discovered catalog value, so the picker needs a regression test for provenance-aware display. Cover user overrides, catalog inheritance, and saved limits when discovery is unavailable.
Keep the Chinese runtime and E2E specifications readable for Chinese users while documenting the configured context-window display behavior.
The new unit regression covers context-window resolution; keep the E2E plan precise about that coverage and the remaining manual user path.

This branch has not been deployed

No deployments
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] space-bunny 模型自定义上下文,无法正确显示

2 participants