Skip to content

feat(providers): restore ChatGPT Web via clean-room browser transport - #12239

Merged
diegosouzapw merged 6 commits into
diegosouzapw:release/v3.8.51from
backryun:codex/restore-chatgpt-web-cleanroom
Sep 2, 2026
Merged

feat(providers): restore ChatGPT Web via clean-room browser transport#12239
diegosouzapw merged 6 commits into
diegosouzapw:release/v3.8.51from
backryun:codex/restore-chatgpt-web-cleanroom

Conversation

@backryun

@backryun backryun commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Restore the retired chatgpt-web provider with an independently implemented, first-party browser transport.
  • Reconstruct authenticated ChatGPT browser sessions from the provider cookie, perform the current first-party handshake, and translate Delta V1 streaming responses into OmniRoute chat output.
  • Support the observed ChatGPT Pro and Free routes, including GPT-5.6 Luna Free and Free Thinking.
  • Pass image, text, PDF, DOCX, and other file attachments through the clean-room upload/turn flow without imposing an OmniRoute-side MIME allowlist.
  • Add migration 171 to seed the restored provider while preserving the separate native chatgpt-web-codex tool bridge.

Related Issues

  • No linked issue. This restores functionality removed when the previous implementation's provenance could not be verified.

Validation

Choose the change type and focused loop from the
Contribution Golden Path. The full unit suite,
Vitest, the 60% coverage gate, and the production build all run in CI on this PR (#8329):

  • Change type: provider / DB
  • Focused tests and category gates from the golden path
  • npm run lint — left to CI; focused lint/type contracts are covered by the checks below
  • Reconciled with the current active release base; focused checks rerun afterward
  • Production-code changes include new and updated automated tests in this PR

Focused results:

  • Clean-room provider and transport tests: 50/50 passed.
  • Clean-room branch combined with the v4.0.7 Codex connector branch: 92/92 passed.
  • npm run typecheck:core: passed on the combined tree.
  • npm run check:open-sse-typecheck: passed with zero live errors on the combined tree.
  • Live browser smoke checks returned exact sentinels for image, TXT, PDF, and DOCX attachments.
  • Live OmniRoute Codex v2 tool round-trip also passed through the separate Codex connector.
  • Current release/v3.8.51: 0 commits behind, 4 commits ahead; git merge-tree --write-tree succeeds without conflicts.

Tests Added Or Updated

Dedicated clean-room coverage:

  • tests/unit/chatgpt-web-browser-session-cleanroom.test.ts
  • tests/unit/chatgpt-web-cleanroom-provider.test.ts
  • tests/unit/chatgpt-web-delta-v1-cleanroom.test.ts
  • tests/unit/chatgpt-web-executor-adapter-cleanroom.test.ts
  • tests/unit/chatgpt-web-first-party-cleanroom.test.ts
  • tests/unit/chatgpt-web-handshake-handoff-cleanroom.test.ts
  • tests/unit/migration-171-restore-chatgpt-web-cleanroom.test.ts

Updated provider, executor, routing, image, session, and retirement contracts:

  • tests/snapshots/executors/executor-map.json
  • tests/unit/browserPool-proxy.test.ts
  • tests/unit/chatcore-executor-proxy.test.ts
  • tests/unit/chatgpt-web-image-handler-retirement.test.ts
  • tests/unit/chatgpt-web-management-retirement.test.ts
  • tests/unit/chatgpt-web-retirement.test.ts
  • tests/unit/chatgpt-web-runtime-block.test.ts
  • tests/unit/chatgpt-web-source-retirement.test.ts
  • tests/unit/combo-auto-candidate-expansion.test.ts
  • tests/unit/flat-rate-cost-5552.test.ts
  • tests/unit/guardrails/visionBridgeRouter.test.ts
  • tests/unit/hard-session-lease-bypass-inventory.test.ts
  • tests/unit/image-generation-route.test.ts
  • tests/unit/image-registry-gpt56.test.ts
  • tests/unit/image-routes-combo-edits-3214-3215.test.ts
  • tests/unit/keepalive-threshold.test.ts
  • tests/unit/messages-count-tokens-route.test.ts
  • tests/unit/model-listing-capability-5420.test.ts
  • tests/unit/provider-node-reserved-prefix.test.ts
  • tests/unit/resolve-web-provider-host.test.ts
  • tests/unit/session-leases-route.test.ts
  • tests/unit/token-health-check-webcookie.test.ts
  • tests/unit/tokenExtractionConfig.test.ts
  • tests/unit/virtual-auto-combo.test.ts

Coverage Notes

  • Browser handshake, session lifecycle, Delta V1 decoding, attachment normalization/upload, provider registration, executor dispatch, validation, migration behavior, and retirement-contract reversal all have focused regression coverage.
  • The compatibility run against the v4.0.7 connector branch verifies that restoring standard ChatGPT Web does not regress the separate native tool bridge.

Reviewer Notes

  • This is a clean-room implementation based only on observable first-party ChatGPT browser behavior and assets; it does not reintroduce the removed implementation.
  • chatgpt-web intentionally advertises toolCalling: false. Native PC/MCP tool access remains isolated in chatgpt-web-codex, where the outer Codex runtime owns sandbox and approval enforcement.
  • Migration 171 is idempotent and restores the provider seed without overwriting user-managed credentials.
  • The browser protocol is upstream-controlled and may drift; focused tests pin the currently observed handshake, routing, and Delta V1 contracts.

@backryun
backryun force-pushed the codex/restore-chatgpt-web-cleanroom branch 17 times, most recently from a21f125 to bb24dda Compare September 2, 2026 08:33
@backryun
backryun force-pushed the codex/restore-chatgpt-web-cleanroom branch from bb24dda to d15912e Compare September 2, 2026 11:49
…ore-chatgpt-web-cleanroom

Clean merge against the tip. The two chat chokepoints this PR grows (chat.ts +40,
chatCore.ts +30) are recorded in the file-size baseline with an annotation; no other
cap moves. The rebaseline is carried here rather than left in a validation worktree —
the mistake that put the 2026-09-02 waves base-red (diegosouzapw#12434).
@diegosouzapw
diegosouzapw merged commit 7ed8ada into diegosouzapw:release/v3.8.51 Sep 2, 2026
4 of 7 checks passed
@backryun
backryun deleted the codex/restore-chatgpt-web-cleanroom branch September 2, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants