Repository navigation
[PR] fix: keep hosted web_search_call in the same run as its reasoning (#7296) - #7302
ranxianglei wants to merge 1 commit into
Conversation
) responsesToCore flattens hosted calls (web_search_call, file_search_call, mcp_call, ...) into contentType:"reasoning" cores. The Responses ordering repair classified them as a second reasoning item and inserted a user separator between the real reasoning and the hosted call, splitting the assistant run — the server then rejects the web_search_call "without its required 'reasoning' item". Classify a flattened hosted-call core (whose rawResponsesItem sidecar carries a hosted-call wire type) as tool-call (phase 2) so the reasoning -> hosted call run stays intact. The separator still lands between distinct runs. Closes #7296
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10986-pr.7302.474fc5bThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7302.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 — no parallel [PR] targets this thread; #7302 is the only PR for #7296. Reviewed the PR head ( Code reviewThe fix is correct and well-targeted.
One narrow edge case found (repro'd, filed as drive-by #7312): CI & base freshness
八问
结论代码正确、测试有牙、diff 干净(2 文件 +88/-1,无跑题改动)。可合,前提: ① CI 重跑确认全量绿(当前 33/56 suite 被 cancel,判定未建立);② 窄边缘场景已由 #7312 跟踪(kernel 侧、人工门禁),不阻塞本 PR。分支落后 master 50 个提交但相关文件零 churn,rebase 应为无冲突。 标签: 源 issue 已打 bug / codex / p2 / scope/wiring(与 PR 现有标签一致);#7312 已打 bug / codex / p3 / scope/kernel。 |
|
(ai: vllm-qwen/qwen3.8-27b) Superseded by #7322 — this fix was cherry-picked (commit 2a2a9e9, |
(ai: vllm-qwen/qwen3.8-27b) Supersession acknowledged — verified live:
Carry-over notes for #7322 (my review findings, same code):
No further action on this thread. |
What
A follow-up turn after a hosted web search was rejected:
The wire order turned from
user → reasoning → web_search_callintouser → reasoning → <synthetic user separator> → web_search_call.Root cause
responsesToCore(kernel) flattens every hosted-call item —web_search_call,file_search_call,mcp_call,computer_call/_output,image_generation_call,code_interpreter_call— into a core withcontentType: "reasoning"(the raw item rides therawResponsesItemsidecar). The host-side ordering repairrepairResponsesAssistantOrderingclassified that core as a second reasoning item, and its run-boundary rule (reasoningafter phase > 0 / already-seen reasoning ⇒ insert a user separator) then split the assistant run between the realreasoningand the hosted call. Aweb_search_callseparated from itsreasoningis rejected by the Responses server.Fix
Host-side (no kernel change): a
contentType: "reasoning"core whoserawResponsesItemsidecar carries a hosted-call wire type is now classified as tool-call (phase 2) instead of reasoning. Thereasoning → hosted callrun stays intact; the separator still lands between distinct runs (genuine second reasoning / message-after-tool-call), which the new second test pins.Classification keys off the sidecar's wire
typeonly — never the core text or id (both are codec-re-derived and client-shapeable).Tests
tests/issue564-responses-ordering.test.ts: two new regression cases — (1)user → reasoning → web_search_callrenders as one intact run with zero separators; (2) two distinct runs (run 1 = reasoning + hosted call, run 2 = reasoning + message) still get exactly one separator, placed after the hosted call and before run 2's reasoning.issue564-responses-ordering(24),issue2627-turn-sep-coverage,issue5139-turn-separator-ranges,invariant-judge-continuity-owned-separators,fold-round2-shape,codex-responses-ws. Full-suite verdict from CI on the pushed head.Closes #7296