zai-org / zai-org/feedback

[Bug] 3.10.2 会话分叉后思考强度选择器默认显示「低」:实际请求仍为 max,UI 兜底落到 variants[0] 而非 defaultVariant

Open
#463 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: P2
Dominant language
No language data
Stars
22
Forks
1
PR merge metrics
No merged PRs in 30d

Description

环境
  • ZCode Desktop 3.10.2(3.10.2.6414,buildCommitId 35824adf,buildTime 2026-08-31),macOS Apple Silicon(darwin 25.6.0)
  • 供应商:BigModel Coding Plan;模型 GLM-5.3-Flash(模型目录 variants 顺序为 ["low","max","high"],defaultVariant max
  • 用户全局推理强度设置(local_setting namespace=model, key=reasoningLevel):{"level":"max"}
现象

对任意会话执行「分叉」后,新会话输入框旁的思考强度选择器默认显示为最低档「低」。经本地数据核验,实际发出的请求并未降级(仍是 effort max),判定为选择器显示/状态回填问题。但它会误导用户以为分叉后思考被降档,每次都得手动重选一遍。

复现步骤
  1. 使用 GLM-5.3-Flash,思考强度选 max;
  2. 打开一个思考强度为 max 的会话,对历史消息执行「分叉」;
  3. 观察新会话的思考强度选择器 → 显示「低」。

多次分叉(不同父会话)均复现。

期望行为
  • 选择器显示并沿用父会话的有效档位(max);或至少
  • 兜底落到模型目录的 defaultVariant,而不是 variants[0]
本地核验证据
  1. 会话库 db.sqlitesession_entrytype='runtime/model_selection'):每个分叉会话在创建的同一毫秒就写入了 {"modelId":"GLM-5.3-Flash","thoughtLevel":"max"} —— 说明分叉路径在初始化时解析到的就是 max;
  2. rollout/model-io-sess_*.jsonl 请求日志:分叉会话、父会话、子代理的实际请求均为 "effort":"max"thinking.budget_tokens=32000,没有低档请求;
  3. 但该分叉会话 UI 上的思考强度选择器显示「低」。
逆向定位线索(基于 3.10.2 随包 zcode.cjs 与 host chunk,仅供参考)
  • 选择器取值链为 thoughtLevel.current ?? defaultLevel ?? available[0]zcodeSessionSettingsToZCodeConfigOptions)。分叉会话的状态快照一旦没带上显式 current / defaultLevel,就会落到 available[0]
  • GLM-5.3-Flash 的 variants 数组顺序恰好是 ["low","max","high"],所以 available[0] = 最低档「低」;
  • CLI 侧模型默认档解析:defaultLevel && levels.includes(defaultLevel) ? defaultLevel : levels[0]
  • 分叉注册路径 registerForkedSessions && c.app.getThoughtLevel() !== s && setThoughtLevel(s) —— 仅当父会话能解析出显式档位时才复制。而 getThoughtLevel() 在多档位模型 + providerOptions 不匹配任一档位预设时会返回 undefined(多档位时 levels.length===1 ? levels[0] : undefined 分支),疑似就是"拿不到显式值 → 状态里没有 current → UI 落到第一项"的来源。
修复建议
  1. 选择器兜底顺序改为 current ?? defaultVariant/defaultLevel ?? available[0]
  2. 分叉时始终把父会话的有效档位写入子会话状态,保证 thoughtLevel.current 有值,而不是依赖解析链兜底。

相关 issue:#420(自动化任务编辑页"推理强度"回显错误——同为"存储高档位、界面显示低",疑似同一处兜底逻辑,可一并修)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the zcode.cjs and host chunk paths named in the report, especially zCodeSessionSettingsToZCodeConfigOptions and registerForkedSession. Reproduce a fork with GLM-5.3-Flash and compare the stored session_entry thoughtLevel with the selector state. Done means the forked selector shows the effective parent level or defaultVariant instead of variants[0], without changing the request effort.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.