fix(tests): resolve stream readiness regression in chatcore translation tests

The stream readiness gate from PR #1693 validates SSE body content.
The test harness checked only `headers.accept` (lowercase) but executors
set `Accept` (capital A), causing the harness to return JSON instead of
SSE for streaming requests. Fixed by checking both header casings.
This commit is contained in:
diegosouzapw
2026-04-27 23:36:47 -03:00
parent f769ce93cc
commit 2f905598e8

View File

@@ -324,7 +324,7 @@ async function invokeChatCore({
return responseFactory(captured, calls);
}
const upstreamStream = String(headers.accept || "")
const upstreamStream = String(headers.Accept || headers.accept || "")
.toLowerCase()
.includes("text/event-stream");
if (responseFormat === "claude") return buildClaudeResponse(upstreamStream);