Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
06ec553
Merge pull request #3678 from lidge-jun/codex/promote-main-243-01a07240
lidge-jun Sep 5, 2026
116c2ac
Merge commit '44ea9576e27c6be8be7f13a86e32bb349368c54d' into codex/re…
invalid-email-address Sep 6, 2026
07b48da
Merge pull request #3785 from lidge-jun/codex/release-244-main-07c0
lidge-jun Sep 6, 2026
bcdf559
chore(release): promote validated 2.45.0 to main [skip ci]
invalid-email-address Sep 6, 2026
b0900e5
chore(release): promote 2.45.0 to main (#3813)
lidge-jun Sep 6, 2026
3970601
chore(release): prepare 2.46.0 stable promotion
invalid-email-address Sep 7, 2026
bba6322
Merge pull request #3851 from lidge-jun/codex/release-246-main
lidge-jun Sep 7, 2026
3d53e5f
release: prepare 2.47.0 from audited regression candidate
invalid-email-address Sep 7, 2026
eda8754
Merge commit '48ab3e1e66cfa6e0c873de2fafa4540ac61d6c7d' into codex/re…
invalid-email-address Sep 7, 2026
f9e3515
Merge commit '57252193b' into codex/release-247-main
invalid-email-address Sep 7, 2026
6f71931
release: promote 2.47.0 to main (#3929)
lidge-jun Sep 7, 2026
9a60256
Merge commit 'd0737cff3' into codex/release-247-main-final
invalid-email-address Sep 7, 2026
9e9b1d3
Merge commit 'f48c322c0' into codex/release-247-main-final
invalid-email-address Sep 7, 2026
947bae9
Merge commit '0d7652ad1' into codex/release-247-main-final
invalid-email-address Sep 7, 2026
f7f890f
release: apply final roster correction to main (#3933)
lidge-jun Sep 7, 2026
544ebee
release: promote 2.48.0 to main
invalid-email-address Sep 8, 2026
d24ff57
release: set main channel version 2.48.0
invalid-email-address Sep 8, 2026
9a27e86
Merge pull request #4011 from lidge-jun/codex/release-248-main
lidge-jun Sep 8, 2026
62849df
release: promote verified 2.49.0 product tree to main
lidge-jun Sep 9, 2026
2f3f736
Merge pull request #4117 from lidge-jun/codex/release-249-main-01a08498
lidge-jun Sep 9, 2026
3a3de88
release: promote verified 2.50.0 product tree to main
lidge-jun Sep 10, 2026
2d4d7a2
Merge pull request #4195 from lidge-jun/codex/release-250-main-01a08a81
lidge-jun Sep 10, 2026
d7dce5a
fix(responses): repair bridged search first leg
luvs01 Sep 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions src/server/responses/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5834,12 +5834,22 @@ async function handleResponsesInner(
isPassthrough: true,
stream: parsed.stream === true,
});
// The bridge wraps the RAW upstream body, so terminal repair below still owns the single
// client-facing terminal — the bridge drops the terminal of every intercepted leg.
const upstreamSseBody = webSearchBridgePlan
// Repair must observe the raw first leg before the bridge suppresses an intercepted search
// lifecycle. Otherwise a provider that leaves that complete call open never arms repair's
// grace timer, so the bridge cannot execute the search or begin its continuation.
let passthroughSseBody = terminalRepairPolicy
? relayResponsesSseWithTerminalRepair(
upstreamResponse.body,
upstream,
terminalRepairPolicy,
translatorBudget,
options.responsesTerminalRepairScheduler,
)
: upstreamResponse.body;
passthroughSseBody = webSearchBridgePlan
? createPassthroughWebSearchBridgeStream({
plan: webSearchBridgePlan,
firstLeg: upstreamResponse.body,
firstLeg: passthroughSseBody,
requestBody: request.body,
// Continuation legs replay the same built request with the executed search appended.
// The first leg already passed the recovery ladder, the outbound size ceiling, and the
Expand All @@ -5866,16 +5876,7 @@ async function handleResponsesInner(
},
signal: upstream.signal,
})
: upstreamResponse.body;
const passthroughSseBody = terminalRepairPolicy
? relayResponsesSseWithTerminalRepair(
upstreamSseBody,
upstream,
terminalRepairPolicy,
translatorBudget,
options.responsesTerminalRepairScheduler,
)
: upstreamSseBody;
: passthroughSseBody;
const repairConfig = route.provider.responsesItemIdRepair;
// Grok Build renders deltas live but reconstructs its durable assistant
// turn from the completed response snapshot. Native Responses streams
Expand Down
9 changes: 8 additions & 1 deletion tests/responses/passthrough-abort.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,15 @@ describe("passthrough relayWithAbort (RC2, passthrough path)", () => {
);

expect(sseBranch).toContain("const terminalRepairPolicy = providerModelResponsesTerminalRepair(");
expect(sseBranch).toContain("const passthroughSseBody = terminalRepairPolicy");
expect(sseBranch).toContain("let passthroughSseBody = terminalRepairPolicy");
expect(sseBranch).toContain(": upstreamResponse.body;");
// Repair has to wrap the raw first leg before the bridge hides its completed web-search call;
// otherwise a terminal-less open leg cannot trigger the repair timer and continuation stalls.
const terminalRepair = sseBranch.indexOf("relayResponsesSseWithTerminalRepair(");
const webSearchBridge = sseBranch.indexOf("createPassthroughWebSearchBridgeStream({");
expect(terminalRepair).toBeGreaterThanOrEqual(0);
expect(webSearchBridge).toBeGreaterThan(terminalRepair);
expect(sseBranch.slice(webSearchBridge)).toContain("firstLeg: passthroughSseBody,");
Comment on lines +66 to +70

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add behavioral coverage for the terminal-less bridge

These assertions only inspect source-text ordering, so they pass without proving the liveness fix: the repair timer could fail to arm, its synthetic terminal could be ignored by the bridge, or the continuation could remain unsent. Add a focused test that supplies a completed-but-never-closing web_search first leg through handleResponses, advances the injected scheduler, and verifies that search execution and the continuation request occur; this directly protects the production hang this change addresses.

AGENTS.md reference: AGENTS.md:L367-L370

Useful? React with 👍 / 👎.

expect(sseBranch).toContain("passthroughSseBody.tee()");
// Rewrite traffic is derived from the finalized block chain so every
// provider-specific transform participates in the platform gate.
Expand Down
Loading