fix(app): preserve thread model choices - #2061
Open
Yuimi-chaya wants to merge 1 commit into
Open
Conversation
Yuimi-chaya
marked this pull request as draft
August 31, 2026 00:24
Yuimi-chaya
force-pushed
the
codex/preserve-thread-model-choice
branch
from
August 31, 2026 00:40
2130645 to
a22bd9d
Compare
Contributor
Author
|
更正上一版诊断:真人测试失败是有效回归信号。原补丁只处理了 Statsig 的一条 snake_case 路径,漏掉了 renderer 模型容器中的 |
Yuimi-chaya
force-pushed
the
codex/preserve-thread-model-choice
branch
from
August 31, 2026 01:21
a22bd9d to
531275a
Compare
Contributor
Author
|
第三次更正:真实覆盖点不在模型目录,而在 Codex++ 对 thread/resume 强行补 modelProvider: custom。当前 app-server 只在请求没有任何显式 model/provider/reasoning override 时恢复持久化线程元数据,因此这个 provider 补丁恰好阻断了原线程模型恢复。失败现场日志中 13 次 resume 全部命中该改写,而 SQLite 的 887 个线程模型仍保持原分布。当前提交已让 thread/resume 完全退出 provider override;PR 继续保持 Draft,等待新构建真人测试。 |
Contributor
Author
|
Windows 真人多线程验证现已通过:从 Codex++ 启动后,多个原本选择不同模型的已有线程均保持各自模型,新线程和 pure API 路由正常。PR 已更新正文并转为 Ready for review。 |
Yuimi-chaya
marked this pull request as ready for review
August 31, 2026 01:45
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.
背景与影响
Codex++ 在 pure API 模式下恢复已有线程时,会把缺少 provider 的 thread/resume 请求改写为显式 modelProvider: custom。当前 Codex app-server 只有在调用方没有显式提供 model、model provider 或 reasoning 配置时,才会恢复线程持久化的整组 model/provider/reasoning 元数据。
因此这个改写会阻断线程原模型恢复,使所有已有线程回退到当前供应商在 config.toml 中配置的默认模型。用户看到的不只是模型选择器显示错误:后续 turn 会实际继续使用错误模型。
OpenAI Codex 自身在检测到恢复模型与记录模型不一致时,也会建议切回原模型,并提示不一致“may affect Codex performance”:
OpenAI Codex resume mismatch warning
这意味着本问题会在用户无感知的情况下,把多个长期线程批量置于 Codex 官方明确警告的模型不一致状态,更容易影响上下文连续性和后续表现。
根因
本地提交 341b7c1 为 pure API 已有会话补充路由时,把 thread/resume 纳入 provider override。每次恢复线程,即使 App 请求没有任何 provider,Codex++ 也会补上 modelProvider: custom。
失败现场确认:
改动
验证
自动化:
真人验证:
范围
本 PR 只修复线程模型恢复和模型目录所有权,不包含字体、locale、Dream Skin、restart 或 Provider Sync 事务改动。