Skip to content

[PR] docs: Document GPT-6.2 folding dropping reasoning (#7144: keep-as-is ruling) | docs: GPT-6.2 折叠丢推理的文档记录(#7144 维持现状裁定) - #7250

Open
ranxianglei wants to merge 2 commits into
masterfrom
docs/7144-gpt62-reasoning-drop
Open

ranxianglei wants to merge 2 commits into
masterfrom
docs/7144-gpt62-reasoning-drop

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

这是啥

GPT-6.2 起,OpenAI Responses API 在对话前部被修改后会作废模型自己的推理记录——之后模型只能凭摘要和可见消息重新想。bili 的压缩折叠(以及 #651 的推理裁剪)对上游来说就是这种前部修改,所以 gpt-6.2+ 的 responses 会话里,每次折叠后模型要重推早先的思考。

怎么处理的

按 #7144 的裁定:维持现状,不写新代码,只补文档记录。在 technical notes(英文 + 中文)加了「GPT-6.2 drops reasoning after prefix edits」一节,写清四件事:

  1. 机制:折叠 = 前缀编辑(块摘要锚在原位 + 摘要进 developer 消息);Protected-message exemption inflates the incompressible context floor: per-compression reasoning is never reclaimable (~83.5% of measured residual) #651 裁剪是同类编辑,第一次裁剪就作废其后活推理,即使没折叠过。
  2. 后果的精确范围:只有「保留尾部的活推理」被作废、模型重推;旧轮次推理的损失对所有模型本来就有,不是新伤害维度——compress.preserveRecentMessages: 0(初始版本姿态)就是更狠的既有合法配置,6.2 最坏情况在它的设计包络内。
  3. 裁定(owner, 2026-11-19):接受现状,影响有界,强模型丢一段思考代价低(下一个工具结果就重新锚定推导)。
  4. 后手:真出现可测症状(长链任务 token 明显翻倍)时按序可选——安静时刻折叠 gate、gpt-6.2+ 关 Protected-message exemption inflates the incompressible context floor: per-compression reasoning is never reclaimable (~83.5% of measured residual) #651(compress.reasoning.drop: false)、委托官方 /responses/compact(唯一无损,但与服务端无状态重放设计 [Bug][Responses HTTP] 删除 previous_response_id 时未重建增量请求历史,导致上下文静默丢失 #1954 矛盾,属另立特性)。

纯文档改动,2 个文件,+57 行,不碰代码。

…ost ruling (#7144)

GPT-6.2 (Responses API) voids reasoning items after any client-side prefix
edit. bili folds and the #651 reasoning drop are exactly that kind of edit, so
on gpt-6.2+ responses sessions the live tail reasoning is invalidated and the
model re-derives. This documents the mechanism, scopes the consequence
(same axis as compress.preserveRecentMessages:0, inside the tool's existing
design envelope), records the owner's 2026-11-19 ruling to keep the status
quo, and lists the cheap levers if a measurable symptom appears.
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: docs/7144-gpt62-reasoning-drop (7c85493)

Latest build — install this exact version

npm install -g billion-context@0.0.10934-pr.7250.f09a624

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
7c85493 billion-context@0.0.10934-pr.7250.f09a624 build
db113ac billion-context@0.0.10932-pr.7250.11f5f03 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr7250.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title docs: GPT-6.2 折叠丢推理的文档记录(#7144 维持现状裁定) [PR] docs: Document GPT-6.2 folding dropping reasoning (#7144: keep-as-is ruling) | docs: GPT-6.2 折叠丢推理的文档记录(#7144 维持现状裁定) Nov 19, 2026
…7144)

The new ZH section referenced '上文无状态重放设计(#1954)' (the stateless
replay design above), but the ZH technical notes are a partial translation
and do not contain the #1954 section (the EN doc has it at line 287, above
the new section). Drop '上文' so the reference is accurate; it still points
to #1954 by number.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

查重: 不重复 — 搜了 open+closed 的 issue/PR,只有本 PR(#7250)针对「GPT-6.2 折叠丢推理的文档记录」;#7144 是裁定来源,不是平行实现 PR。

标签: p3 + scope/docs(保留现有 pr) — 纯文档改动、无活跃缺陷(裁定是维持现状),故 p3 + scope/docs。

CI: 绿 — 84 个 check:57 success + 27 skipped(docs-only 变更,e2e 套件按 path-filter 跳过)+ 0 failed。merge_state_status: blocked 只是 branch-protection 对 skipped 必需 check 的判定,无实际失败。

核对结论(拉了分支 docs/7144-gpt62-reasoning-drop 逐条对代码核实):

  • diff 与描述一致:2 文件、+57 行、纯文档、不碰代码;分支与 master 无落后(0 commits behind)。
  • 文档技术声明全部对得上代码:
    • devParts = [...systemParts, ...forgedSummaries, prompt] → src/server/prepare-responses.ts:489(实际 projection.systemParts,文档缩写,无误)。
    • src/reasoning-drop.ts 默认开、阈值 2048 → 对得上(DEFAULT_COMPRESS_REASONING = { drop: true, threshold: 2048 })。
    • tests/responses-fold-cache-seam.test.ts 存在。
    • src/codex-compact.ts 无网络调用、是 forge 模块 → 确认「从不调 OpenAI 端点」。
    • compress.preserveRecentMessages 配置键存在。
  • EN 文档放置正确:新节在 #1954(无状态重放)节之后、Single-writer 节之前,「the stateless replay design above ([Bug][Responses HTTP] 删除 previous_response_id 时未重建增量请求历史,导致上下文静默丢失 #1954)」引用准确。

顺手修了一处(独立 commit 7c85493135):ZH 文档新节写「与上文无状态重放设计(#1954)矛盾」,但 ZH technical notes 是部分翻译、没有 #1954 这一节(EN 有,ZH 缺),所以「上文」在 ZH 里是悬空引用。删掉「上文」、保留 #1954 编号引用,使引用准确。

既有观察(非本 PR 引入,不在此修):ZH technical notes 缺 6 个 EN 节(#1954、#4516、#2202、#4331、#4762、#4820)——ZH 是长期部分翻译的既有状态;本 PR 的 ZH 新节忠实翻译了 EN(含 above 引用),只是 ZH 缺节让引用悬空,已顺手修掉。


八问(中文,供人工 reviewer):

  1. 是什么问题: 按 Any modification to the conversation history in GPT causes the model to discard reasoning information. Only the official | GPT只要修改对话历史就是导致模型丢弃推理信息,只有官方压缩能免丢 #7144「维持现状」裁定,给 GPT-6.2 起「前缀编辑后作废模型推理」补文档记录(EN+ZH technical notes),不写新代码。
  2. 什么原因导致的: GPT-6.2 的 Responses API 在对话前部轮次被修改后会作废(删除)推理项,模型只能凭剩余可见文本重推;bili 的折叠(块摘要锚原位 + 摘要进 developer 消息)和 Protected-message exemption inflates the incompressible context floor: per-compression reasoning is never reclaimable (~83.5% of measured residual) #651 推理裁剪都是这种客户端前缀编辑,故 gpt-6.2+ 的 responses 会话每次折叠后模型要重推早先思考。
  3. 影响范围与严重程度: 仅 responses 线路 + GPT-6.2 及以上;每次折叠/裁剪作废编辑点之后的「活推理」,模型重推。严重度有界:旧轮次推理损失对所有模型本来就有(非新伤害维度),preserveRecentMessages: 0 是更狠的既有合法配置,6.2 最坏情况在设计包络内;强模型丢一段思考代价低(下一个工具结果就重新锚定)。
  4. 怎么修复的: 纯文档(无代码)。EN+ZH technical notes 各加一节,写清机制、后果精确范围、owner 裁定(维持现状)、以及真出现可测症状时的按序后手(安静时刻折叠 gate / gpt-6.2+ 关 Protected-message exemption inflates the incompressible context floor: per-compression reasoning is never reclaimable (~83.5% of measured residual) #651 / 委托官方 /responses/compact)。
  5. 是否有回归问题: 无代码改动,无回归;文档技术声明逐条对代码核实过(见上)。
  6. 是否破坏缓存: 不涉及(纯文档)。
  7. 是否改了设计方向: 不涉及(纯文档;裁定是「维持现状」,不转向)。
  8. 是否引入了新的配置: 不涉及(纯文档;提到的 compress.reasoning.drop: false / preserveRecentMessages 都是既有配置键,文档只是引用,未新增)。

收工判定: 可合。 文档准确、放置合理、CI 绿;顺手修了 ZH 一处悬空引用(commit 7c85493135)。

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant