Skip to content

refactor(streaming): migrate OpenAI Responses SSE framing to the shared codec (phase 1 of #842) #944

Description

@leseb

Part of #842 (parent epic praxis-proxy/praxis#985).

Scope

Migrate the OpenAI Responses provider-neutral SSE record framing onto the shared praxis_filter::sse codec, and bump the Praxis dependency to a revision that carries the codec.

Consumers in scope:

  • apis/src/openai/sse/frame.rs — replace the local framer with the shared SseDecoder.
  • apis/src/openai/sse/responses/parser.rs — feed &Bytes chunks through the adapter.
  • apis/src/openai/responses/stream_events/ — the openai_stream_events filter.

Out of scope (tracked in sibling phases)

  • Anthropic stream_events framing.
  • A2A route-capture scanner + token-usage reuse.

Acceptance criteria (subset of #842)

  • Update the Praxis dependency to a revision containing the shared codec.
  • SseFrameParser delegates byte-level line/record framing to SseDecoder; the OpenAI-facing SseFrame / SseParseError surface, [DONE] sentinel, event-count budget, timeouts, and lifecycle rules stay in the consumers.
  • Preserve pass-through / transform / fail-open / fail-closed / terminal / EOF behavior; no full-body buffering; no weakened backpressure.
  • Retain consumer-specific limits above the shared framing bounds.
  • Remove obsolete duplicate parser tests; keep focused adapter tests plus the codec's conformance coverage.

Status

Addressed by PR #942 (Refs #842).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions