Repository navigation
Conversation
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 This is the only open PR fixing #6802. Related prior work covers different mechanisms — #2583/#2589 (Cowork-transport stamp leak, fixed by withholding the stamp), #3556/#3736 (openai-wire probe-and-remember pck), #5890 (per-process pck probe) — none covers a per-request direct-send fallback while the proxy claim is still set, which is exactly what #6802 reports. The issue author already did this due diligence. Review — verified on the branch, looks good. I checked out
Non-blocking observations (flagging, not gating):
CI: all checks Behavior change (flagged per policy): on the omp direct-send fallback the outgoing body previously carried the stamped 八问(供 reviewer):
判定:代码正确、范围精准、测试有牙、diff 干净;CI 绿后可合。属 wire/message-shape 变更(降级路径出站 body 少一个字段),按 §7.4 留人工 review 档,不建议 auto-merge。 |
(ai: vllm-qwen/qwen3.8-27b) CI 全绿。 全部 check 跑完:37 success + 13 skipped(gated e2e 车道,本 PR 不触及其路径,预期跳过),0 failed,无遗留。11 条 判定不变:代码正确、范围精准、测试有牙、diff 干净,CI 已绿 → 可合。属 wire/message-shape 变更(降级路径出站 body 少一个字段),按 §7.4 留人工 review 档,合并由人工执行。 |
642124b to
480bba8
Compare
(ai: vllm-qwen/qwen3.8-27b) CI run 1/6 — merge-conflict resolution, done. Rebased the PR head onto current master and force-pushed (conflict rebase, as this lane is authorized to do):
Local verification on the rebased head (targeted only — full-suite verdict is the fresh CI pass this push triggers):
Live state after push (verified via GitHub API this run, not from memory): 七问
|
(ai: vllm-qwen/qwen3.8-27b) CI run (re-trigger) — no action needed; the blocker is already resolved. This wake reported merge state
Nothing was changed in this run — no fetch-integrate, no commits, no pushes (there was nothing to integrate: the remote PR head was already the rebased head I verified). The full CI pass triggered by the previous run's final-head push is the one that will give the green/red verdict; I have not seen its result yet and will not claim it. 七问
|
While a proxy is claimed (BILLION_CONTEXT_PROXY), the omp plugin stamps the session id as a top-level prompt_cache_key. The proxy strips it before it forwards. But when one request falls back to a direct send (the proxy is not ready, or its respawn failed), the claim is still set, so the body was already stamped and nothing strips the field. A strict upstream then rejects the request: 400 prompt_cache_key: Extra inputs are not permitted Record the values the plugin stamps, and give the omp lane its own direct-send guard: it runs the shared incremental guard first, then removes a top-level prompt_cache_key only when its value is one this process stamped. A key the host set itself is left alone.
480bba8 to
921649e
Compare
(ai: vllm-qwen/qwen3.8-27b) CI run 2 — new conflict resolved + red-CI diagnosis, done. This wake was NOT stale — master had moved ~20h ( 1. Conflict rebase (again, same spot, same pattern). One conflict in 2. The Local verification on the rebased head (targeted only — the push triggers the full CI pass):
Live state after push (verified via GitHub API this run): head 七问
|
# Conflicts: # src/agent/pi.ts
|
Your fix is merged — it landed via the wave-11 batch merge (#6827 → master GitHub did not auto-flip this PR to Merged because the head of the branch moved after the batch snapshot (a rebase onto newer master changed the commit object ids), so the PR's current tip is not literally an ancestor of master. A Closing as merged-via-batch. Thanks for the clean single-purpose fix. |
|
Thanks — confirmed: master Side note: because the merged commit is a rebased copy, |
Fixes #6802
Problem
While a proxy is claimed (
BILLION_CONTEXT_PROXY),stampPromptCacheKeyadds the session id as a top-levelprompt_cache_key, and the proxy strips it before forwarding. When one request falls back to a direct send (proxy not ready, or respawn failed), the claim is still set, so the body is stamped but no proxy strips it. The omp lane'sprepareDirectSend(createPrepareDirectSend) only restores or refuses incremental bodies, so the field reaches the upstream and a strict upstream answers400 prompt_cache_key: Extra inputs are not permitted.Fix
stampPromptCacheKeyrecords each value it stamps (bounded set, oldest out first).createOmpDirectSendGuard()insrc/agent/pi.ts: runs the shared incremental guard first (restore / refuse unchanged), then drops a top-levelprompt_cache_keyonly when its value is one this process stamped. A key the host set itself is kept. The body is returned asrestored, whichdirectSendOrRefusealready sends throughwithRestoredBody.src/agent/omp-native.tsuses this guard instead of the bare shared guard.The stamp itself, the proxy path and other lanes are unchanged.
Tests run
tests/omp-direct-send-stamped-pck.test.ts(4 tests): stamped key dropped; a host's own key kept; body without the key untouched; non-JSON body untouched. Against the old guard (createPrepareDirectSend) the first test fails and the other three pass; with this change all 4 pass.runLaunch aider: nothing declared → default hosts whitelisted for cert-MITM (#1048)) fails the same way on the base in my environment.npm run typecheck→ 0 errors.npm run check:unused-exports→ clean.npm run check:test-import-graph→ ok.Note: four tests in
native-intercept.test.ts/issue3304-incremental-direct-send.test.tsfail on both base and branch whenBILLION_CONTEXT_PROXY/PI_PROXY_ANTHROPICare set in the shell running the tests, and pass when they are unset.Not run