You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Extend stableSystemAnchor's stable head and tail diff update capability to plugin mode (prioritize Pi) | [Feature] 将 stableSystemAnchor 的稳定头部与尾部 diff 更新能力扩展到插件模式(优先 Pi) #2385
Another plugin-mode host is affected: DSH (DeepSeek Harness desktop).
The gate is exactly as described — opts.stableSystemAnchor && !pluginMode on all four wires
(dist/index.js @4320482 responses / @4440169 anthropic / @4490715 openai / @4509526 google).
DSH's lane is plugin mode: dist/agent/dsh-native.js does headers.set("x-bili-plugin","dsh") (plus x-bili-plugin-conversation),
so pluginAgentHeader(req.headers) returns "dsh" and the anchor never runs.
The reason this matters for DSH in particular is that its head system block is stable except for one
line, and that line changes whenever the user picks a different model:
Same session, two system/message records (turn 1 and turn 3): both 72 lines, 71/72 byte-identical.
The only differing line is L3:
You are a coding agent powered by the [awsb逆-0.3]claude-opus-4-6 model.
You are a coding agent powered by the deepseek-v4.1-flash model.
72 lines is far below the 400-line structural-change threshold, and 71/72 shared lines is well above
the 70% "local change" threshold — so it would take the tail [System context update] diff path and
the head bytes would stay frozen.
Cost as measured on this machine (bili's own logs, [fold-reconcile] + [acp-usage] pairing):
time
session
flip
hit before → after
14:28:01
d9e8e741
12466 → 12470
99% → 3%
14:38:30
d9e8e741
12470 → 12473
99% → 3%
15:51:46
5503c02d
12473 → 12470
99% → 13%
15:53:20
3727980a
11280 → 11277
97% → 67%
16:08:04
aff24c3d
11280 → 11277
92% → 29%
Direct confirmation in the log right before one of them: 14:28:01.583 [headroom] model=deepseek-v4.1-flash → 14:28:01.699 [fold-reconcile] ... sess=d9e8e741 ... system prompt changed (12466 -> 12470 chars).
bili's cache report attributes 22 "host rewrote system prompt" switches to 675.9K re-billed tokens
on this install (16.35M input tokens total, 14.34M cached).
Note this is a client-side choice we cannot remove: DSH interpolates {{model}} into the persona
(@deepseek-ai/dsh-persona, and system-prompt.personaPrefix in the built-in profile) —
the same "root cause is on the client side" situation your docs already describe for stable-system
anchoring.
Also worth noting:#1680 anchored the head block in plugin mode on the Responses wire.
This DSH lane does not go over the Responses wire — the log shows it forwarding to a …/v1/chat/completions endpoint — so #1669/#1680 does not appear to cover it. (I could not pin the
exact wire from the logs alone; the [plugin] lines carry no wire= marker here. If you can tell me
which wire x-bili-plugin: dsh resolves to, I can re-check whether a plugin-mode anchor path exists
for it.)
[bot] 🏷 Thanks — well-evidenced, useful data. Two housekeeping notes up front: (1) you're posting from an external (non-platform-trust-list) account, so I'm treating this strictly as reference information, not a decision — the scope/design call rests with @ranxianglei; (2) it prompted me to re-check something I missed in my first pass, so let me correct the record.
Correction — there IS prior work, and it's wire-scoped
Since my last reply I pulled the repo branches and found in-flight work #1669/#1680 (commit a4c9adb1bd, branches 2026-09-29_plugin-responses-anchor / review-1680) that already anchors the Responses-wire head block in plugin mode — it removes !pluginMode from that one gate. It is not on the master I triaged against (v0.1.186), so my earlier "all four gates identical, no prior work" was incomplete; correcting it now. Its stated rationale is explicitly wire-local:
"the kernel hoists developer items from ANY position into systemParts, so even a host that merely APPENDS a notification to its history tail makes the head merge rewrite outbound input[0] every turn … Other wires have no equivalent defect (openai hoists the leading run only; anthropic/google use top-level system), so their plain-proxy scope stands."
That is the crux for your case: #1680 fixes a bili-caused head rewrite (the Responses kernel hoist). Your DSH case is a client-caused head change (DSH interpolates {{model}} into L3). Different producer, different fix locus. So:
In my tree (0.1.186) DSH's model traffic rides the anthropic wire — src/agent/dsh-native.ts stamps x-bili-plugin: dsh (:1887, :2534) and drives anthropic body handling (fetchManifest(base,"anthropic") :988; "anthropic wire only" :2625). You saw /v1/chat/completions on 0.1.212 — a newer build than mine — so it may be a newer routing path or a provider endpoint; I can't pin it from 0.1.186. Either way it's a chat/anthropic wire, not Responses, so #1680 does not cover it — consistent with what you observed.
The honest catch on DSH (why I'd not blanket-add it)
In DSH the only volatile head line is the model name, and that line changes iff the model switches. So the head change is inseparable from a model switch. Whether the anchor helps therefore hinges on one thing: do the flipped models share an upstream prefix-cache namespace?
Same backend/pool (label-only change): freezing the old head lets the post-flip request hit the prior prefix → the anchor fully fixes the 99%→low drops.
Cross-provider (your Claude↔DeepSeek labels look like distinct backends): a different model is a cold cache by definition — the new model can't read the old model's cache entries, so freezing the head buys nothing; the diff note becomes pure overhead and the frozen head asserts a stale model name (the note corrects it, so not misleading, just useless).
Your partial post-flip hits (67% / 29% / 13%) are the interesting tell: a true cross-backend cold start would sit near 0% on the flip request, so partial recovery hints same-pool reuse may be happening — but the cross-provider labels hint otherwise. One datum settles it: after an A→B flip, does the next B request climb back to ~99% (B warming normally), and decisively — do the two flipped models route to the same upstream cache pool? If yes → add dsh; if no → the real fix stays host-side (keep the persona/model line out of the head, carry it in a tail or user message), exactly as #2333 concluded for OMP.
First allowlist entry = {pi} — a content/instruction edit (AGENTS.md) is a genuine localized change that benefits regardless of any model coupling. Unconditional win.
Reuse stableSystemAnchor (no new field); default stays OFF.
Still waiting on @ranxianglei to confirm: (a) allowlist {pi} vs {pi,dsh}, (b) reuse-knob vs new field, (c) go-ahead to touch the three non-Responses gates + docs + tests while coordinating with #1680. Nothing above is an owner decision — happy to fold the DSH datum into the analysis if the cache-namespace question gets answered.
结构化八问(供 reviewer)
是什么问题:插件模式宿主(Pi/DSH)会话中途改写头部 system 时,因四处门槛的 !pluginMode 被排除在 stableSystemAnchor 之外,头部字节变化导致整段前缀缓存重付。
Follow-up: the two data points you asked for (same DSH box).
Short answer to "after an A→B flip, does the next B request climb back to ~99%?": yes, immediately.
I parsed 53,500 lines of bili log (current + rotated), pairing every [fold-reconcile] system prompt changed event with the same session's [acp-usage] samples, and using [window-change] within 3 s of the event to separate a real model change from a head rewrite without one. 161 events:
147 events have no model change at all, and they cost nothing — 96–100% hit before and after. These are two large oscillators (Δ = ±8033 and Δ = ±12426 chars) where a host flips between two prompt shapes while the model stays put; each shape apparently keeps its own warm prefix. This is also why my first report over-attributed the damage to fold-reconcile churn: the churn is real but almost all of it is free.
14 events coincide with a model change. Hit rate by position after the change:
So a flip costs exactly one full prefix re-pay, then it is back to normal. Not a persistent cold start.
On "the head change is inseparable from a model switch" — your read is right for DSH, and I can name the line. Filtering to |Δ| ≤ 20 chars (too small to be anything but a name-length difference) gives 7 events, all Δ = +3/+4/−3/−7:
That is the {{model}} interpolation on L3 and nothing else, exactly as reconstructed in my first post.
On the cache-namespace question (the one that actually decides it) — partial, and it leans your way. In this log the same underlying family shows up under four ids: deepseek-v4.1-flash, cn:deepseek-v4.1-flash, DeepSeek-V4.1-Flash-1017, deepseek-v4.1-flash-1. One flip between two of them cost nothing:
A 100% hit on the first request after the label changed is strong evidence that the new label's prefix was already cached — i.e. these labels share a cache namespace, and a frozen head would have been readable. The same-family flips that did cost (13% / 67% / 29%) are consistent with the complement: those exact new head bytes had not been seen before. So the split I see is not "same backend vs different backend" but "were these exact head bytes already in cache" — which is precisely the condition a frozen head guarantees.
If you want it settled rather than argued, I can drive one deliberately: pin a session to one model, flip once, and compare the #1 hit rate with and without the anchor. That needs the gate open, so it stays your call.
Since your bot flagged it: I'm not on the platform trust list, so treat all of the above as reference data, not a decision — same as the first post.
[bot] 🏷 Status update — the full assessment is the comment directly above this one; this is just the outcome and where things stand.
What I did: verified the DSH evidence against the code, and — importantly — found prior work I'd missed in my first pass. #1669/#1680 (a4c9adb1bd, branches 2026-09-29_plugin-responses-anchor / review-1680) already anchors the Responses-wire head block in plugin mode; it is not on master v0.1.186. That PR is defect-scoped (the Responses kernel hoist rewrites outbound input[0] every turn). Your DSH case is client-caused on a chat/anthropic wire, so it sits in #2385's remaining scope, not #1680's — complementary, not a duplicate.
DSH benefit is conditional: its only volatile head line is the model name, which changes iff the model switches. If the flipped models share an upstream cache pool → the anchor fully fixes the 99%→low drops; if cross-provider (Claude↔DeepSeek, distinct backends) → cold start anyway, the anchor buys nothing (and the diff note becomes overhead). One datum settles it: do the two flipped models route to the same upstream cache pool?
Recommendation (shape unchanged): first allowlist entry {pi} (a genuine localized content edit — unconditional win); dsh conditional pending that datum; Responses wire deferred to fix: anchor Responses-wire head block in plugin mode (#1669) #1680; reuse the existing stableSystemAnchor knob, default stays OFF.
Next step — gated on @ranxianglei. Implementation waits on three confirmations: (a) allowlist {pi} vs {pi,dsh}, (b) reuse-knob vs a new field, (c) go-ahead to touch the three non-Responses gates + docs + tests while coordinating with #1680. Feature-triage (discuss-before-implement) and §7.4 (wire shape in both modes + config semantics = must-stay-human) both require your sign-off. No code has been changed yet. Happy to fold the DSH cache-namespace answer into the analysis as soon as it's known.
结构化八问(当前状态,供 reviewer)
是什么问题:插件宿主(Pi/DSH)会话中途改写头部 system 时,因四处门槛的 !pluginMode 被排除在 stableSystemAnchor 之外 → 头部字节变化导致整段前缀缓存重付。
[bot] 🏷 Much sharper dataset — thanks. It changes the framing of the DSH question, so let me update my read. (Still reference data, not a decision — @ranxianglei decides.)
The key reframe your numbers support: the cost is not "a head change busts the cache." It is "the first appearance of a given head byte-sequence costs one full prefix re-pay; once seen, that sequence stays warm." Your 147 zero-cost events (model-stable shape oscillators, Δ = ±8033 / ±12426) confirm the cache holds several head prefixes at once — so flipping between two already-seen shapes is free. Your "exactly one re-pay, then 99%" on model changes is the same rule at the model level.
That reframing is precisely what a frozen anchor exploits: hold the head bytes constant → there is only ever one head sequence to cache → the repeated one-time re-pays disappear.
Where I'd sharpen the conclusion (honesty pass):
Genuine cross-provider switch = zero anchor benefit. When the underlying model/backend actually changes (Claude↔DeepSeek), the new model owns its own cache namespace — the whole conversation re-processes regardless of head bytes, and the anchor can't reach another model's cache. So the anchor's DSH value is confined to same-underlying-model label churn — your deepseek-v4.1-flash ↔ DeepSeek-V4.1-Flash-1017 family, whose 100%-hit first request confirms a shared namespace.
Your 2-shape oscillators are already free today. The anchor is roughly neutral for them, plus one small recurring cost: the anchor caps its diff-note list at 8, and past that the churn guard replaces the head outright (one deliberate re-pay) to reset. So a session cycling through many distinct labels gets the big win; one ping-ponging two already-warm shapes gains little and pays a periodic churn-guard re-pay every ~8 diffs.
Stale model identity in the frozen head. Once anchored, L3 keeps asserting the first model forever; every later switch rides the tail diff note. Functionally fine (the model follows the note), but it is a real semantic wrinkle worth naming, not burying.
Net: including dsh is now well-supported — its dominant recurring cost mode (distinct-label head churn within a shared namespace) is exactly what the anchor removes, and worst case ≈ today. I'd seat it beside {pi} as a legitimate second entry; the initial scope is the owner's call:
{pi} = most conservative (the original ask; content/instruction edits — unconditional win).
{pi, dsh} = additionally captures the now-evidenced model-label churn.
On your A/B offer: pin a session, flip once, compare the #1 hit-rate with/without the anchor — that is exactly the right definitive test. It needs the gate open, i.e. owner sign-off on implementation first, so it belongs in the acceptance criteria, not as a pre-step. I'm not treating it as agreed; it's a sound idea contingent on the go-ahead.
Still gated on @ranxianglei: (a) allowlist {pi} vs {pi,dsh}, (b) reuse-knob vs a new field, (c) go-ahead for the three non-Responses gates + docs + tests, coordinating with #1680. No code changed yet.
结构化八问(当前状态,供 reviewer)
是什么问题:插件宿主(Pi/DSH)会话中途改写头部 system 时被 !pluginMode 排除在 stableSystemAnchor 之外;DSH 头部唯一易变行是模型名({{model}} 插值于 L3)。
Activity
ranxianglei commentedon Oct 8, 2026
[bot] 🏷 收到。先给结论:问题真实存在,我已核对代码确认;机制可以干净地迁移到插件模式——但这是一次触及「双模式 wire 形状 + 配置面语义」的功能变更,按本仓规则属于必须人工拍板、不能自动合入的那一档。 我给出一个明确的推荐方案(不是选择题),等你确认三点后开工。
一、我验证了什么(不是凭描述)
src/server.ts四处锚定调用全部受opts.stableSystemAnchor && !pluginMode限制:anthropic(:3725)、openai(:4023)、google(:4306)、responses(:4608)。排除理由写在 :3722 注释——「插件 agent 自管上下文,锚定会重复处理」。这是一个保守的默认范围,不是结构性不兼容。session.metadata["stableSystem.<surface>"],每轮从会话状态重新注入为尾部 user 消息(anthropic :3875 / openai :4128 / google :4393 / responses :4708),不进 kernel fold 空间 → 天然穿越压缩/重启、不会逐轮累积(上限ANCHOR_MAX_NOTES=8)。这套东西在插件模式下无需改造。二、方案对比与我的推荐
stableSystemAnchor布尔开关 + 内部按宿主白名单谓词(evidence-per-client,仿dshPersonaFingerprintApplies,src/session-id.ts:161),首批只放pi。四处门槛改为(!pluginMode || <allowlisted>)。stableSystemAnchorPlugin/ per-agent map)——擅自发明新配置形态,按配置面纪律默认禁止,需你明确签核才做。我明确推荐 A:不新增任何配置字段(复用现有布尔已能表达用户意图「让我的系统头稳定」),按宿主收敛是实现细节而非用户维度;默认仍
false,不影响任何现有用户。三、具体改动面(A 方案)
src/session-id.ts(或 system-anchor.ts)新增stableAnchorPluginAgentApplies(headers):x-bili-plugin === "pi";后续宿主需带流量证据再进白名单。src/server.ts四处门槛改为opts.stableSystemAnchor && (!pluginMode || stableAnchorPluginAgentApplies(req.headers))。pluginAgentHeader===undefined且只在 Responses 线分支。Pi 走 anthropic/openai 线(registerProvider、chat 形 payload),不经该分支 → 首批范围无需动身份派生。将来若把某个 Responses 线插件宿主放进白名单,才需同步放宽该臂。stableSystemAnchor段(zh :654)现在写死「仅纯代理模式…插件模式 agent 永不被锚定」,必须改为「纯代理 + 白名单插件宿主(当前 pi)」。四、需要你先拍板的三点(建议,非选择题)
stableSystemAnchor布尔,不新增字段。五、诚实边界
六、结构化判断
!pluginMode门槛被排除在 stableSystemAnchor 之外,头部字节变化导致整段前缀缓存重付。判定:方向成立、方案内聚、风险可控,但按规则需你确认第四节三点后我再进入实现并开 PR(Closes #2385)。 若认可 A 方案与 {pi} 白名单,回复确认我就开工。
[-][Feature] 将 stableSystemAnchor 的稳定头部与尾部 diff 更新能力扩展到插件模式(优先 Pi)[/-][+][Feature] Extend stableSystemAnchor's stable head and tail diff update capability to plugin mode (prioritize Pi) | [Feature] 将 stableSystemAnchor 的稳定头部与尾部 diff 更新能力扩展到插件模式(优先 Pi)[/+]pengkaicheng commentedon Nov 9, 2026
Another plugin-mode host is affected: DSH (DeepSeek Harness desktop).
The gate is exactly as described —
opts.stableSystemAnchor && !pluginModeon all four wires(
dist/index.js@4320482 responses / @4440169 anthropic / @4490715 openai / @4509526 google).DSH's lane is plugin mode:
dist/agent/dsh-native.jsdoesheaders.set("x-bili-plugin","dsh")(plusx-bili-plugin-conversation),so
pluginAgentHeader(req.headers)returns"dsh"and the anchor never runs.The reason this matters for DSH in particular is that its head system block is stable except for one
line, and that line changes whenever the user picks a different model:
system/messagerecords (turn 1 and turn 3): both 72 lines, 71/72 byte-identical.The only differing line is L3:
You are a coding agent powered by the [awsb逆-0.3]claude-opus-4-6 model.You are a coding agent powered by the deepseek-v4.1-flash model.the 70% "local change" threshold — so it would take the tail
[System context update]diff path andthe head bytes would stay frozen.
Cost as measured on this machine (bili's own logs,
[fold-reconcile]+[acp-usage]pairing):Direct confirmation in the log right before one of them:
14:28:01.583 [headroom] model=deepseek-v4.1-flash→14:28:01.699 [fold-reconcile] ... sess=d9e8e741 ... system prompt changed (12466 -> 12470 chars).bili's cache report attributes 22 "host rewrote system prompt" switches to 675.9K re-billed tokens
on this install (16.35M input tokens total, 14.34M cached).
Note this is a client-side choice we cannot remove: DSH interpolates
{{model}}into the persona(
@deepseek-ai/dsh-persona, andsystem-prompt.personaPrefixin the built-in profile) —the same "root cause is on the client side" situation your docs already describe for stable-system
anchoring.
Environment: billion-context 0.1.212 (daa082e) · DSH desktop (Electron) · Windows 11 ·
lane
dsh, proxy127.0.0.1:18791· DSH native plugin (x-bili-plugin: dsh).Also worth noting: #1680 anchored the head block in plugin mode on the Responses wire.
This DSH lane does not go over the Responses wire — the log shows it forwarding to a
…/v1/chat/completionsendpoint — so #1669/#1680 does not appear to cover it. (I could not pin theexact wire from the logs alone; the
[plugin]lines carry nowire=marker here. If you can tell mewhich wire
x-bili-plugin: dshresolves to, I can re-check whether a plugin-mode anchor path existsfor it.)
ranxianglei commentedon Nov 9, 2026
[bot] 🏷 Thanks — well-evidenced, useful data. Two housekeeping notes up front: (1) you're posting from an external (non-platform-trust-list) account, so I'm treating this strictly as reference information, not a decision — the scope/design call rests with @ranxianglei; (2) it prompted me to re-check something I missed in my first pass, so let me correct the record.
Correction — there IS prior work, and it's wire-scoped
Since my last reply I pulled the repo branches and found in-flight work
#1669/#1680(commita4c9adb1bd, branches2026-09-29_plugin-responses-anchor/review-1680) that already anchors the Responses-wire head block in plugin mode — it removes!pluginModefrom that one gate. It is not on the master I triaged against (v0.1.186), so my earlier "all four gates identical, no prior work" was incomplete; correcting it now. Its stated rationale is explicitly wire-local:That is the crux for your case: #1680 fixes a bili-caused head rewrite (the Responses kernel hoist). Your DSH case is a client-caused head change (DSH interpolates
{{model}}into L3). Different producer, different fix locus. So:Your wire question
In my tree (0.1.186) DSH's model traffic rides the anthropic wire —
src/agent/dsh-native.tsstampsx-bili-plugin: dsh(:1887, :2534) and drives anthropic body handling (fetchManifest(base,"anthropic"):988; "anthropic wire only" :2625). You saw/v1/chat/completionson 0.1.212 — a newer build than mine — so it may be a newer routing path or a provider endpoint; I can't pin it from 0.1.186. Either way it's a chat/anthropic wire, not Responses, so #1680 does not cover it — consistent with what you observed.The honest catch on DSH (why I'd not blanket-add it)
In DSH the only volatile head line is the model name, and that line changes iff the model switches. So the head change is inseparable from a model switch. Whether the anchor helps therefore hinges on one thing: do the flipped models share an upstream prefix-cache namespace?
Your partial post-flip hits (67% / 29% / 13%) are the interesting tell: a true cross-backend cold start would sit near 0% on the flip request, so partial recovery hints same-pool reuse may be happening — but the cross-provider labels hint otherwise. One datum settles it: after an A→B flip, does the next B request climb back to ~99% (B warming normally), and decisively — do the two flipped models route to the same upstream cache pool? If yes → add
dsh; if no → the real fix stays host-side (keep the persona/model line out of the head, carry it in a tail or user message), exactly as #2333 concluded for OMP.Refined recommendation (same shape, tighter scope)
{pi}— a content/instruction edit (AGENTS.md) is a genuine localized change that benefits regardless of any model coupling. Unconditional win.dsh= conditional — hold until the cache-namespace question above is answered (the same evidence-per-client discipline plugin 模式动态 developer 通知被 hoist 合并进头部块,出站前缀自 input[0] 断裂(#1638 本地复现) #1669 applied).stableSystemAnchor(no new field); default stays OFF.Still waiting on @ranxianglei to confirm: (a) allowlist
{pi}vs{pi,dsh}, (b) reuse-knob vs new field, (c) go-ahead to touch the three non-Responses gates + docs + tests while coordinating with #1680. Nothing above is an owner decision — happy to fold the DSH datum into the analysis if the cache-namespace question gets answered.结构化八问(供 reviewer)
!pluginMode被排除在 stableSystemAnchor 之外,头部字节变化导致整段前缀缓存重付。判定:方向成立、方案内聚;本轮新增两个关键事实——① #1680 已在途覆盖 Responses 线(修正我上轮"无前置工作"的说法);② DSH 收益是条件性的(取决于翻转模型是否同缓存池)。等 @ranxianglei 确认范围后即可开工。
pengkaicheng commentedon Nov 9, 2026
Follow-up: the two data points you asked for (same DSH box).
Short answer to "after an A→B flip, does the next B request climb back to ~99%?": yes, immediately.
I parsed 53,500 lines of bili log (current + rotated), pairing every
[fold-reconcile] system prompt changedevent with the same session's[acp-usage]samples, and using[window-change]within 3 s of the event to separate a real model change from a head rewrite without one. 161 events:So a flip costs exactly one full prefix re-pay, then it is back to normal. Not a persistent cold start.
On "the head change is inseparable from a model switch" — your read is right for DSH, and I can name the line. Filtering to |Δ| ≤ 20 chars (too small to be anything but a name-length difference) gives 7 events, all Δ = +3/+4/−3/−7:
That is the
{{model}}interpolation on L3 and nothing else, exactly as reconstructed in my first post.On the cache-namespace question (the one that actually decides it) — partial, and it leans your way. In this log the same underlying family shows up under four ids:
deepseek-v4.1-flash,cn:deepseek-v4.1-flash,DeepSeek-V4.1-Flash-1017,deepseek-v4.1-flash-1. One flip between two of them cost nothing:A 100% hit on the first request after the label changed is strong evidence that the new label's prefix was already cached — i.e. these labels share a cache namespace, and a frozen head would have been readable. The same-family flips that did cost (13% / 67% / 29%) are consistent with the complement: those exact new head bytes had not been seen before. So the split I see is not "same backend vs different backend" but "were these exact head bytes already in cache" — which is precisely the condition a frozen head guarantees.
If you want it settled rather than argued, I can drive one deliberately: pin a session to one model, flip once, and compare the #1 hit rate with and without the anchor. That needs the gate open, so it stays your call.
Since your bot flagged it: I'm not on the platform trust list, so treat all of the above as reference data, not a decision — same as the first post.
ranxianglei commentedon Nov 9, 2026
[bot] 🏷 Status update — the full assessment is the comment directly above this one; this is just the outcome and where things stand.
What I did: verified the DSH evidence against the code, and — importantly — found prior work I'd missed in my first pass. #1669/#1680 (
a4c9adb1bd, branches2026-09-29_plugin-responses-anchor/review-1680) already anchors the Responses-wire head block in plugin mode; it is not on master v0.1.186. That PR is defect-scoped (the Responses kernel hoist rewrites outboundinput[0]every turn). Your DSH case is client-caused on a chat/anthropic wire, so it sits in #2385's remaining scope, not #1680's — complementary, not a duplicate.Outcome / where it stands:
dsh-native.ts:988/:2625) → not covered by fix: anchor Responses-wire head block in plugin mode (#1669) #1680, consistent with your/v1/chat/completionslog.{pi}(a genuine localized content edit — unconditional win);dshconditional pending that datum; Responses wire deferred to fix: anchor Responses-wire head block in plugin mode (#1669) #1680; reuse the existingstableSystemAnchorknob, default stays OFF.Next step — gated on @ranxianglei. Implementation waits on three confirmations: (a) allowlist
{pi}vs{pi,dsh}, (b) reuse-knob vs a new field, (c) go-ahead to touch the three non-Responses gates + docs + tests while coordinating with #1680. Feature-triage (discuss-before-implement) and §7.4 (wire shape in both modes + config semantics = must-stay-human) both require your sign-off. No code has been changed yet. Happy to fold the DSH cache-namespace answer into the analysis as soon as it's known.结构化八问(当前状态,供 reviewer)
!pluginMode被排除在 stableSystemAnchor 之外 → 头部字节变化导致整段前缀缓存重付。判定:分析与方案内聚完成,等 @ranxianglei 确认范围后即可开工;本轮未改动任何代码。
ranxianglei commentedon Nov 9, 2026
[bot] 🏷 Much sharper dataset — thanks. It changes the framing of the DSH question, so let me update my read. (Still reference data, not a decision — @ranxianglei decides.)
The key reframe your numbers support: the cost is not "a head change busts the cache." It is "the first appearance of a given head byte-sequence costs one full prefix re-pay; once seen, that sequence stays warm." Your 147 zero-cost events (model-stable shape oscillators, Δ = ±8033 / ±12426) confirm the cache holds several head prefixes at once — so flipping between two already-seen shapes is free. Your "exactly one re-pay, then 99%" on model changes is the same rule at the model level.
That reframing is precisely what a frozen anchor exploits: hold the head bytes constant → there is only ever one head sequence to cache → the repeated one-time re-pays disappear.
Where I'd sharpen the conclusion (honesty pass):
deepseek-v4.1-flash↔DeepSeek-V4.1-Flash-1017family, whose 100%-hit first request confirms a shared namespace.Net: including
dshis now well-supported — its dominant recurring cost mode (distinct-label head churn within a shared namespace) is exactly what the anchor removes, and worst case ≈ today. I'd seat it beside{pi}as a legitimate second entry; the initial scope is the owner's call:{pi}= most conservative (the original ask; content/instruction edits — unconditional win).{pi, dsh}= additionally captures the now-evidenced model-label churn.On your A/B offer: pin a session, flip once, compare the #1 hit-rate with/without the anchor — that is exactly the right definitive test. It needs the gate open, i.e. owner sign-off on implementation first, so it belongs in the acceptance criteria, not as a pre-step. I'm not treating it as agreed; it's a sound idea contingent on the go-ahead.
Still gated on @ranxianglei: (a) allowlist
{pi}vs{pi,dsh}, (b) reuse-knob vs a new field, (c) go-ahead for the three non-Responses gates + docs + tests, coordinating with #1680. No code changed yet.结构化八问(当前状态,供 reviewer)
!pluginMode排除在 stableSystemAnchor 之外;DSH 头部唯一易变行是模型名({{model}}插值于 L3)。判定:本轮数据把 DSH 从「条件性」推进到「有据可依的第二白名单项」;初始范围(
{pi}vs{pi,dsh})仍待 @ranxianglei 拍板,之后即可开工。本轮未改动任何代码。