Skip to content

fix(openai): accept missing content-type on ChatGPT Responses SSE stream#90533

Closed
clawsweeper[bot] wants to merge 5 commits into
mainfrom
clawsweeper/automerge-openclaw-openclaw-90399
Closed

fix(openai): accept missing content-type on ChatGPT Responses SSE stream#90533
clawsweeper[bot] wants to merge 5 commits into
mainfrom
clawsweeper/automerge-openclaw-openclaw-90399

Conversation

@clawsweeper

@clawsweeper clawsweeper Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Makes #90399 merge-ready for the ClawSweeper automerge loop.
The edit pass should inspect the live PR diff, review comments, and failing checks; rebase if needed; keep the contributor branch credited; and stop only when validation is green or an external blocker is proven.

ClawSweeper 🐠 replacement reef notes:

  • Repair fallback: GitHub rejected the repair branch push because it updates workflow files and the ClawSweeper app token does not have workflows permission

Inherited issue-closing references from the source PR:
Fixes #90382

Co-author credit kept:

fish notes: model gpt-5.5, reasoning high; reviewed against f1924ad.

@clawsweeper clawsweeper Bot added commands Command implementations agents Agent runtime and tooling size: S clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge proof: supplied External PR includes structured after-fix real behavior proof. proof: sufficient ClawSweeper judged the real behavior proof convincing. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. clawsweeper Tracked by ClawSweeper automation labels Jun 5, 2026
@clawsweeper

clawsweeper Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

Current main already fixes the central ChatGPT Responses missing content-type failure with stream body sniffing and content-type synthesis; this replacement PR's remaining Accept-header and JSDoc/test additions are useful hygiene but no longer necessary to keep open.

So I’m closing this as already implemented rather than keeping a duplicate issue open.

Review details

Best possible solution:

Keep the current main body-sniffing normalization as the canonical fix and close this replacement branch as redundant hygiene rather than merging another provider-transport change.

Do we have a high-confidence way to reproduce the issue?

Yes for shipped behavior: the linked bug report gives a concrete v2026.6.1 probe path and logs showing HTTP 200 with an empty content-type failing as invalid_provider_content_type. Current main should not reproduce that failure because the guard now normalizes missing-content-type SSE bodies before SDK parsing.

Is this the best way to solve the issue?

No for keeping this PR open: the current main guard is the better canonical fix because the source PR reported that an Accept header alone did not stop the live endpoint from returning no content type. The PR's scoped Accept header is compatible hygiene, but not required to solve the remaining observable problem.

Security review:

Security review cleared: The PR changes scoped provider request handling tests, one request-option helper, and JSDoc only; it does not add dependencies, workflows, credentials handling, package resolution, or new code-execution paths.

AGENTS.md: found and applied where relevant.

What I checked:

  • Current main implementation: Current main normalizes successful streaming SDK responses with missing content type by sniffing a cloned body and synthesizing text/event-stream for SSE bytes or JSON for JSON bytes before the OpenAI SDK consumes the stream. (src/agents/provider-transport-fetch.ts:304, e0018382eb00)
  • Current main regression coverage: Current main already covers the observed missing-content-type SSE path, including a ChatGPT Codex /responses URL, and asserts the stream parses successfully. (src/agents/provider-transport-fetch.test.ts:245, e0018382eb00)
  • PR delta compared with current main: Against current main, the PR does not change provider-transport-fetch.ts; its unique runtime change is the scoped ChatGPT Responses Accept: text/event-stream request option plus tests/JSDoc. (src/agents/openai-transport-stream.ts:1846, ecc88e19f9cc)
  • Git history provenance: git blame ties the current main missing-content-type normalization guard to commit 506c2ee, which is the best local proof commit for the implemented behavior. (src/agents/provider-transport-fetch.ts:304, 506c2ee18186)
  • Fix timestamp: The proof commit is on current main with commit timestamp 2026-06-04T22:34:53-04:00. (506c2ee18186)
  • Release provenance: No tag contains the proof commit, git merge-base --is-ancestor succeeds for current main and fails for v2026.6.1, so this is implemented on current main but not proven shipped in the latest release. (506c2ee18186)

Likely related people:

  • Peter Steinberger: Git blame and shortlog show the current main OpenAI transport and guarded fetch implementation, including the missing-content-type normalization guard, comes from the same proof commit by this author in the local history. (role: current implementation owner; confidence: high; commits: 506c2ee18186; files: src/agents/provider-transport-fetch.ts, src/agents/provider-transport-fetch.test.ts, src/agents/openai-transport-stream.ts)
  • baanish: The related source PR and closed bug report supplied the live ChatGPT OAuth reproduction, after-fix terminal proof, and original replacement-branch commits that this PR preserved. (role: reporter and source contributor; confidence: medium; commits: 68def1774edf, dd3d67d41414, 50d84e1b3852; files: src/agents/openai-transport-stream.ts, src/agents/provider-transport-fetch.test.ts, src/commands/migrate/skill-selection-prompt.ts)

Codex review notes: model gpt-5.5, reasoning high; reviewed against e0018382eb00; fix evidence: commit 506c2ee18186, main fix timestamp 2026-06-04T22:34:53-04:00.

@openclaw-barnacle openclaw-barnacle Bot removed the proof: supplied External PR includes structured after-fix real behavior proof. label Jun 5, 2026
@clawsweeper

clawsweeper Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

🦞🧹
ClawSweeper automerge is enabled.

  • Head: ecc88e19f9cc
  • Label: clawsweeper:automerge
  • Action: exact-head review queued (workflow sweep.yml, event repository_dispatch).
  • Flow: review this head, repair/rebase only if needed, then re-review the exact repaired head before merge.

Draft PRs stay fix-only until GitHub marks them ready for review. Pause with /clawsweeper stop.

Automerge progress:

  • 2026-06-05 03:42:52 UTC review queued f1924adab49c (queued)
  • 2026-06-05 03:52:20 UTC review passed f1924adab49c (structured ClawSweeper verdict: pass (sha=f1924adab49cb46d56b0a27a61c56afe07bbb...)
  • 2026-06-05 04:03:04 UTC review queued ecc88e19f9cc (after repair)
  • 2026-06-05 04:11:26 UTC review passed ecc88e19f9cc (structured ClawSweeper verdict: pass (sha=ecc88e19f9cc1d41086ddb93019501ed57ada...)
  • 2026-06-05 05:15:23 UTC review queued ecc88e19f9cc (queued)

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 5, 2026
@clawsweeper clawsweeper Bot force-pushed the clawsweeper/automerge-openclaw-openclaw-90399 branch from f1924ad to ecc88e1 Compare June 5, 2026 04:03
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Jun 5, 2026
@clawsweeper

clawsweeper Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

ClawSweeper applied the proposed close for this PR.

@clawsweeper clawsweeper Bot closed this Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge clawsweeper Tracked by ClawSweeper automation commands Command implementations P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ChatGPT-OAuth gpt-5.5 fails with invalid_provider_content_type after 2026.6.1 (SDK Responses stream missing Accept: text/event-stream)

1 participant