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
Bug: native Codex responses backend returns valid SSE without content-type, causing invalid_provider_content_type for openai/gpt-5.5 #91662
After upgrading to OpenClaw 2026.6.1, openai/gpt-5.5 through Codex OAuth failed in the native OpenClaw runtime before producing content.
The failure was not an auth/account/network issue. A direct minimal request to the native Codex backend succeeded and returned a valid SSE stream, but the response had no content-type header. OpenClaw then rejected the response with invalid_provider_content_type.
Thanks for the context here. I did a careful shell check against current main, and this is already implemented.
Close as implemented on current main: the reported v2026.6.1 failure is real in the release tag, but main now normalizes successful missing-content-type streamed OpenAI/Codex responses after sniffing the body and has targeted regression coverage; the fix has not shipped in a release yet.
So I’m closing this as already implemented rather than keeping a duplicate issue open.
Review details
Best possible solution:
Keep the current main transport normalization and let the next release carry it; no separate OpenClaw source change remains for this issue.
Do we have a high-confidence way to reproduce the issue?
Yes from source against v2026.6.1: the release tag rejects OK streamed responses with missing content-type before parsing. Current main no longer has that failure path, so this is not a current-main failing repro.
Is this the best way to solve the issue?
Yes. The main fix is at the shared guarded fetch boundary, normalizes only successful streamed OpenAI-compatible responses after body sniffing, and still rejects HTML or unknown bodies.
Security review:
Security review: No PR patch is under review, and the issue is not a security-sensitive report.
AGENTS.md: found and applied where relevant.
What I checked:
Current source handles missing content-type streams: Current main classifies a successful streamed OpenAI-compatible response body when content-type is missing, then wraps SSE bodies with text/event-stream before the SDK parses them. (src/agents/provider-transport-fetch.ts:304, 257b251e2690)
Current fetch path applies the normalization before returning the response: buildGuardedModelFetch checks streaming request bodies and calls normalizeOpenAISdkStreamContentType before building the managed response. (src/agents/provider-transport-fetch.ts:841, 257b251e2690)
Regression coverage exists on main: The tests cover missing content-type SSE from chatgpt.com/backend-api/codex/responses, open streams, split SSE prefixes, JSON synthesis, and HTML rejection. (src/agents/provider-transport-fetch.test.ts:245, 257b251e2690)
Latest release still has the reported failure mode: The v2026.6.1 tag uses assertOpenAISdkStreamContentType and throws invalid_provider_content_type whenever an OK streamed response has a missing content-type. (src/agents/provider-transport-fetch.ts:231, 2e08f0f4221f)
Release provenance is main-only: git tag --contains produced no release tag for 82afc46, while git branch --contains showed main, so the fix is present on current main but not shipped in v2026.6.1. (82afc4678ace)
Likely related people:
harjoth: Line blame and the -S history for the current normalization/tests point to commit 82afc46. (role: recent area contributor; confidence: high; commits: 82afc4678ace; files: src/agents/provider-transport-fetch.ts, src/agents/provider-transport-fetch.test.ts)
Vincent Koc: Recent main history on the same provider transport/Responses files includes adjacent OpenAI-compatible Responses fixes, and the v2026.6.1 tag provenance is tied to this release path. (role: recent responses transport contributor; confidence: medium; commits: 1727ec7b2dca, b08e1109c67e, 2e08f0f4221f; files: src/agents/provider-transport-fetch.ts, src/llm/providers/openai-chatgpt-responses.ts)
Codex review notes: model gpt-5.5, reasoning high; reviewed against 257b251e2690; fix evidence: commit 82afc4678ace, main fix timestamp 2026-06-09T11:16:15+09:00.
Activity
clawsweeper commentedon Jun 9, 2026
Thanks for the context here. I did a careful shell check against current
main, and this is already implemented.Close as implemented on current main: the reported v2026.6.1 failure is real in the release tag, but main now normalizes successful missing-content-type streamed OpenAI/Codex responses after sniffing the body and has targeted regression coverage; the fix has not shipped in a release yet.
So I’m closing this as already implemented rather than keeping a duplicate issue open.
Review details
Best possible solution:
Keep the current main transport normalization and let the next release carry it; no separate OpenClaw source change remains for this issue.
Do we have a high-confidence way to reproduce the issue?
Yes from source against v2026.6.1: the release tag rejects OK streamed responses with missing content-type before parsing. Current main no longer has that failure path, so this is not a current-main failing repro.
Is this the best way to solve the issue?
Yes. The main fix is at the shared guarded fetch boundary, normalizes only successful streamed OpenAI-compatible responses after body sniffing, and still rejects HTML or unknown bodies.
Security review:
Security review: No PR patch is under review, and the issue is not a security-sensitive report.
AGENTS.md: found and applied where relevant.
What I checked:
src/agents/provider-transport-fetch.ts:304, 257b251e2690)src/agents/provider-transport-fetch.ts:841, 257b251e2690)src/agents/provider-transport-fetch.test.ts:245, 257b251e2690)src/agents/provider-transport-fetch.ts:231, 2e08f0f4221f)src/agents/provider-transport-fetch.ts:304, 82afc4678ace)Likely related people:
src/agents/provider-transport-fetch.ts,src/agents/provider-transport-fetch.test.ts)src/agents/provider-transport-fetch.ts,src/llm/providers/openai-chatgpt-responses.ts)Codex review notes: model gpt-5.5, reasoning high; reviewed against 257b251e2690; fix evidence: commit 82afc4678ace, main fix timestamp 2026-06-09T11:16:15+09:00.