Skip to content

responses.create cannot stream #15

Closed

Description

@theQuert

responses.create has no stream argument, so the SDK cannot stream /v1/responses. The docs send streaming callers to the OpenAI SDK.

The gateway streams Responses events. For OpenAI channels the upstream event stream is passed through. For other providers the gateway builds the events itself (response.created, response.output_item.added, response.content_part.added, response.output_text.delta, ... response.completed) and ends with data: [DONE].

Fix: responses.create(stream=True) (sync and async) sends "stream": true and returns a Stream[ResponseStreamEvent].

  • Events keep their type and all fields.
  • The stream ends at [DONE], or at the end of the body when there is no [DONE].
  • An error event raises APIError.

The gateway's own events do not yet carry sequence_number or item_id, so those fields are optional.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Uy5vXsRpMhug7v3XwTMZHv

Activity

  1. added a commit that references this issue on Oct 7, 2026
  2. theQuert commented on Oct 7, 2026

    @theQuert
    MemberAuthor

    Fixed by #17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions