Skip to content

refactor(core): expose session transport eligibility - #41558

Open
nexxeln wants to merge 1 commit into
responses-route-unificationfrom
session-http-eligibility
Open

refactor(core): expose session transport eligibility#41558
nexxeln wants to merge 1 commit into
responses-route-unificationfrom
session-http-eligibility

Conversation

@nexxeln

@nexxeln nexxeln commented Aug 10, 2026

Copy link
Copy Markdown
Member

Issue for this PR

N/A

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Collects Session HTTP middleware once during SessionModelRequest.prepare and installs an HTTP wrapper only when middleware is actually registered. Prepared model requests now expose whether they are eligible for Session-bound WebSocket execution.

The existing Request/Response bridge, middleware nesting order, repeated sends, interruption, and synthetic response replacement remain unchanged. Codex base URL and headers are moved out of the built-in Session HTTP hook into transport-neutral provider and Session headers so ChatGPT-authenticated OpenAI requests remain WebSocket-eligible.

How did you verify your code works?

  • cd packages/core && bun typecheck
  • cd packages/core && bun test test/plugin/promise.test.ts test/plugin/provider-openai.test.ts test/session-runner.test.ts test/session-model-request.test.ts
  • bun typecheck from the workspace root

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.

1 participant