Skip to content

update#1788

Open
kristentr wants to merge 11 commits intoopenai:masterfrom
kristentr:master
Open

update#1788
kristentr wants to merge 11 commits intoopenai:masterfrom
kristentr:master

Conversation

@kristentr
Copy link
Copy Markdown

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Additional context & links

dependabot bot and others added 10 commits February 25, 2026 23:09
Bumps [basic-ftp](https://github.com/patrickjuchli/basic-ftp) from 5.0.5 to 5.2.0.
- [Release notes](https://github.com/patrickjuchli/basic-ftp/releases)
- [Changelog](https://github.com/patrickjuchli/basic-ftp/blob/master/CHANGELOG.md)
- [Commits](patrickjuchli/basic-ftp@v5.0.5...v5.2.0)

---
updated-dependencies:
- dependency-name: basic-ftp
  dependency-version: 5.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…em-tests/browser-direct-import/basic-ftp-5.2.0

chore(deps): bump basic-ftp from 5.0.5 to 5.2.0 in /ecosystem-tests/browser-direct-import
* chore(internal): refactor imports

* refactor(tests): switch from prism to steady

* chore(tests): bump steady to v0.19.4

* feat(client): add async iterator and stream() to WebSocket classes

* chore(tests): bump steady to v0.19.5

* release: 6.33.0

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
* Release please  branches  master  changes  next  components  OpenAI (#22) (#23)

* chore(internal): refactor imports

* refactor(tests): switch from prism to steady

* chore(tests): bump steady to v0.19.4

* feat(client): add async iterator and stream() to WebSocket classes

* chore(tests): bump steady to v0.19.5

* release: 6.33.0

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>

* chore(deps): bump seroval and solid-js in /ecosystem-tests/vercel-edge (#25)

Bumps [seroval](https://github.com/lxsmnsyc/seroval) and [solid-js](https://github.com/solidjs/solid). These dependencies needed to be updated together.

Updates `seroval` from 0.5.1 to 1.4.2
- [Release notes](https://github.com/lxsmnsyc/seroval/releases)
- [Commits](https://github.com/lxsmnsyc/seroval/commits)

Updates `solid-js` from 1.7.11 to 1.9.6
- [Release notes](https://github.com/solidjs/solid/releases)
- [Changelog](https://github.com/solidjs/solid/blob/main/CHANGELOG.md)
- [Commits](solidjs/solid@v1.7.11...v1.9.6)

---
updated-dependencies:
- dependency-name: seroval
  dependency-version: 1.4.2
  dependency-type: indirect
- dependency-name: solid-js
  dependency-version: 1.9.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Release please  branches  master  changes  next  components  OpenAI (#22) (#23)

* chore(internal): refactor imports

* refactor(tests): switch from prism to steady

* chore(tests): bump steady to v0.19.4

* feat(client): add async iterator and stream() to WebSocket classes

* chore(tests): bump steady to v0.19.5

* release: 6.33.0

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>

* chore(deps): bump seroval and solid-js in /ecosystem-tests/vercel-edge (#25)

Bumps [seroval](https://github.com/lxsmnsyc/seroval) and [solid-js](https://github.com/solidjs/solid). These dependencies needed to be updated together.

Updates `seroval` from 0.5.1 to 1.4.2
- [Release notes](https://github.com/lxsmnsyc/seroval/releases)
- [Commits](https://github.com/lxsmnsyc/seroval/commits)

Updates `solid-js` from 1.7.11 to 1.9.6
- [Release notes](https://github.com/solidjs/solid/releases)
- [Changelog](https://github.com/solidjs/solid/blob/main/CHANGELOG.md)
- [Commits](solidjs/solid@v1.7.11...v1.9.6)

---
updated-dependencies:
- dependency-name: seroval
  dependency-version: 1.4.2
  dependency-type: indirect
- dependency-name: solid-js
  dependency-version: 1.9.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Main (#26) (#27)

* Release please  branches  master  changes  next  components  OpenAI (#22) (#23)

* chore(internal): refactor imports

* refactor(tests): switch from prism to steady

* chore(tests): bump steady to v0.19.4

* feat(client): add async iterator and stream() to WebSocket classes

* chore(tests): bump steady to v0.19.5

* release: 6.33.0

---------



* chore(deps): bump seroval and solid-js in /ecosystem-tests/vercel-edge (#25)

Bumps [seroval](https://github.com/lxsmnsyc/seroval) and [solid-js](https://github.com/solidjs/solid). These dependencies needed to be updated together.

Updates `seroval` from 0.5.1 to 1.4.2
- [Release notes](https://github.com/lxsmnsyc/seroval/releases)
- [Commits](https://github.com/lxsmnsyc/seroval/commits)

Updates `solid-js` from 1.7.11 to 1.9.6
- [Release notes](https://github.com/solidjs/solid/releases)
- [Changelog](https://github.com/solidjs/solid/blob/main/CHANGELOG.md)
- [Commits](solidjs/solid@v1.7.11...v1.9.6)

---
updated-dependencies:
- dependency-name: seroval
  dependency-version: 1.4.2
  dependency-type: indirect
- dependency-name: solid-js
  dependency-version: 1.9.6
  dependency-type: indirect
...




---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@kristentr kristentr requested a review from a team as a code owner March 23, 2026 00:45
* Release please  branches  master  changes  next  components  OpenAI (#22) (#23)

* chore(internal): refactor imports

* refactor(tests): switch from prism to steady

* chore(tests): bump steady to v0.19.4

* feat(client): add async iterator and stream() to WebSocket classes

* chore(tests): bump steady to v0.19.5

* release: 6.33.0

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>

* chore(deps): bump seroval and solid-js in /ecosystem-tests/vercel-edge (#25)

Bumps [seroval](https://github.com/lxsmnsyc/seroval) and [solid-js](https://github.com/solidjs/solid). These dependencies needed to be updated together.

Updates `seroval` from 0.5.1 to 1.4.2
- [Release notes](https://github.com/lxsmnsyc/seroval/releases)
- [Commits](https://github.com/lxsmnsyc/seroval/commits)

Updates `solid-js` from 1.7.11 to 1.9.6
- [Release notes](https://github.com/solidjs/solid/releases)
- [Changelog](https://github.com/solidjs/solid/blob/main/CHANGELOG.md)
- [Commits](solidjs/solid@v1.7.11...v1.9.6)

---
updated-dependencies:
- dependency-name: seroval
  dependency-version: 1.4.2
  dependency-type: indirect
- dependency-name: solid-js
  dependency-version: 1.9.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Main (#26) (#27)

* Release please  branches  master  changes  next  components  OpenAI (#22) (#23)

* chore(internal): refactor imports

* refactor(tests): switch from prism to steady

* chore(tests): bump steady to v0.19.4

* feat(client): add async iterator and stream() to WebSocket classes

* chore(tests): bump steady to v0.19.5

* release: 6.33.0

---------



* chore(deps): bump seroval and solid-js in /ecosystem-tests/vercel-edge (#25)

Bumps [seroval](https://github.com/lxsmnsyc/seroval) and [solid-js](https://github.com/solidjs/solid). These dependencies needed to be updated together.

Updates `seroval` from 0.5.1 to 1.4.2
- [Release notes](https://github.com/lxsmnsyc/seroval/releases)
- [Commits](https://github.com/lxsmnsyc/seroval/commits)

Updates `solid-js` from 1.7.11 to 1.9.6
- [Release notes](https://github.com/solidjs/solid/releases)
- [Changelog](https://github.com/solidjs/solid/blob/main/CHANGELOG.md)
- [Commits](solidjs/solid@v1.7.11...v1.9.6)

---
updated-dependencies:
- dependency-name: seroval
  dependency-version: 1.4.2
  dependency-type: indirect
- dependency-name: solid-js
  dependency-version: 1.9.6
  dependency-type: indirect
...




---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fb31c761f7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +91 to +92
stream(): AsyncIterableIterator<ResponsesStreamMessage> {
return this[Symbol.asyncIterator]();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add iterator support to the realtime WebSocket clients too

If a consumer applies the new for await/.stream() pattern to the other public websocket entry points (src/realtime/ws.ts, src/realtime/websocket.ts, and the src/beta/... variants), those classes still throw because they do not implement stream() or Symbol.asyncIterator. That leaves the SDK with two incompatible websocket APIs under one feature, so shared helpers over responses and realtime sockets will fail at runtime unless the sibling classes are updated as well.

Useful? React with 👍 / 👎.

Comment on lines +103 to +106
const push = (msg: ResponsesStreamMessage) => {
queue.push(msg);
resolvers.shift()?.();
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a hard cap to the queue and define an overflow behavior? Right now this is an unbounded in-memory buffer. a slow or abandoned consumer might cause unbounded growth.

Comment on lines +143 to +145
this.on('error', onEmitterError);
this.socket.on('open', onOpen);
this.socket.on('close', onClose);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, does each iterator attach its own listeners? if so, this might increase memory usage. Probably not a concern but we should either enforce its ownership or document that multi-consumer duplication is intentional.

Comment on lines +147 to +162
switch (this.socket.readyState) {
case WS.WebSocket.CONNECTING:
push({ type: 'connecting' });
break;
case WS.WebSocket.OPEN:
push({ type: 'open' });
break;
case WS.WebSocket.CLOSING:
push({ type: 'closing' });
break;
case WS.WebSocket.CLOSED:
push({ type: 'close' });
done = true;
cleanup();
break;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it could be a race condition. The socket can transition after listeners are attached BUT before the readyState switch runs. That might end up enqueueing dupes of open or close events. I wonder if we should route these through a guarded call like emitOpen / emitClose

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.

3 participants