Skip to content

fix(qoder): 恢复 token 登录账号的上下文窗口切换能力 - #506

Merged
caigee-cmd merged 2 commits into
caigee-cmd:mainfrom
mcxinyu:m1/fix-qoder-cn-edit-context-with-token
Nov 13, 2026
Merged

caigee-cmd merged 2 commits into
caigee-cmd:mainfrom
mcxinyu:m1/fix-qoder-cn-edit-context-with-token

Conversation

@mcxinyu

@mcxinyu mcxinyu commented Nov 13, 2026

Copy link
Copy Markdown
Contributor
  • display.go 新增 qoderContextConfigWindows,解析 PAT 网关 /model/list 中嵌套的 context_config 对象(key 为窗口标签,value 含 token_count 和可选 is_default)
  • 默认窗口优先取 is_default 标记项,未标记时回退到最小档
  • 最大窗口取所有可选项最大值
  • 当 catalog 为空时(仍在加载),不覆盖已存的窗口值,避免误删用户选择
  • direct.go / plaintext.mjs 在聊天请求中同时发送 parameters.contextWindow 与原有的 context_length,与官方客户端行为对齐
  • 新增单元测试覆盖 context_config 解析、toggle 行为保护及参数转发

Summary

Test plan

  • go test ./...
  • go vet ./...
  • cd worker && npm test
  • cd frontend && npm run build && npm run lint
  • Added changelog/unreleased/<slug>.md, or this PR has no user-facing change
  • No tokens, auth blobs, raw captures, or host details in the diff

- display.go 新增 qoderContextConfigWindows,解析 PAT 网关 /model/list 中嵌套的 context_config 对象(key 为窗口标签,value 含 token_count 和可选 is_default)
- 默认窗口优先取 is_default 标记项,未标记时回退到最小档
- 最大窗口取所有可选项最大值
- 当 catalog 为空时(仍在加载),不覆盖已存的窗口值,避免误删用户选择
- direct.go / plaintext.mjs 在聊天请求中同时发送 parameters.contextWindow 与原有的 context_length,与官方客户端行为对齐
- 新增单元测试覆盖 context_config 解析、toggle 行为保护及参数转发
@mcxinyu
mcxinyu force-pushed the m1/fix-qoder-cn-edit-context-with-token branch from dfd5045 to 13401cb Compare November 13, 2026 08:23
@caigee-cmd
caigee-cmd merged commit f18c955 into caigee-cmd:main Nov 13, 2026
6 checks passed
@mcxinyu
mcxinyu deleted the m1/fix-qoder-cn-edit-context-with-token branch November 13, 2026 09:35
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