Skip to content

Summary readers reject valid SSE events whose JSON spans multiple data fields #6101

Closed

Description

@Afloat16

Problem

Both the preflight summary extractor and external HTTP summary validator parse each data line independently as JSON. Valid SSE events may carry multiple data fields joined with LF; pretty-printed JSON therefore yields an empty summary or invalid-frame error and unnecessary fallback.

Reproduction

At master 541cf26, split valid JSON events across data fields with heartbeat comments for Responses, Anthropic, Chat Completions and Google. Direct extraction and real local HTTP summary candidates fail, including an event-header-only Responses case. Base: 93 passed / 9 failed.

Expected

Group buffered events in the existing sse-util module and join data fields before either summary reader parses JSON. Preserve event-type scope, malformed-JSON rejection and existing framing/terminal contracts. WHATWG data-field semantics: https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation

Prior work

Screened all 3,221 cached upstream PRs. #4 handles streaming splitters, #260 handles plugin event rewriting, and #1709 handles dangling DONE sentinels. These buffered summary readers still lacked multiline event grouping. Previous Afloat16 PRs #6046–#6055 are excluded.

Activity

  1. ranxianglei commented on Nov 12, 2026

    @ranxianglei
    Owner

    Fixed in batch PR #6439 (merged).

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions