Skip to content

Responses API: implement resumable streaming and cancellation #1356

@AlexCheema

Description

@AlexCheema

Context

The Responses API streaming events now include sequence_number fields per the OpenAI spec, but we don't yet implement the features that depend on them.

TODO

  • Resumable streaming: Support the starting_after query parameter on GET /v1/responses/{id}?stream=true&starting_after={sequence_number} to resume a dropped stream. This requires persisting stream events (at least for the duration of the response).
  • Response cancellation: Support POST /v1/responses/{id}/cancel to stop an in-progress response.

Notes

  • sequence_number is already emitted on all streaming events (monotonically increasing per response)
  • No event persistence exists yet — streams are currently fire-and-forget async generators

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