Skip to content

Add hosted shell response stream events#1800

Open
raashish1601 wants to merge 3 commits intoopenai:masterfrom
raashish1601:contributor-11/openai-node-1750
Open

Add hosted shell response stream events#1800
raashish1601 wants to merge 3 commits intoopenai:masterfrom
raashish1601:contributor-11/openai-node-1750

Conversation

@raashish1601
Copy link
Copy Markdown

Summary

  • add the missing hosted-shell Responses stream event interfaces for
    esponse.shell_call_command.* and
    esponse.shell_call_output_content.*
  • include them in ResponseStreamEvent, ResponsesServerEvent, and the generated export/docs index
  • add a snapshot-backed ResponseStream regression covering the hosted-shell event sequence

Testing

  • ./node_modules/.bin/jest tests/lib/ResponseStream.test.ts --runInBand
  • ./node_modules/.bin/prettier --check --end-of-line lf src/resources/responses/responses.ts src/resources/responses/api.md tests/lib/ResponseStream.test.ts
  • ./node_modules/.bin/eslint src/resources/responses/responses.ts tests/lib/ResponseStream.test.ts

Fixes #1750.

@raashish1601 raashish1601 requested a review from a team as a code owner March 27, 2026 23:18
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: c1aeda1a7d

ℹ️ 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".

/**
* An opaque obfuscation token for sensitive command text.
*/
obfuscation: string;
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 Mark shell command obfuscation as optional

ResponseShellCallCommandDeltaEvent declares obfuscation as a required string, but Responses.StreamOptions.include_obfuscation in the same file documents that obfuscation fields can be disabled to reduce bandwidth. In that mode, response.shell_call_command.delta events may not carry this field, so consumers relying on this type can incorrectly assume it is always present and hit runtime undefined access. Model obfuscation as optional (or nullable) to keep the event type aligned with the documented stream option.

Useful? React with 👍 / 👎.

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.

Hosted shell types and streaming events missing

1 participant