Skip to content

fix(example): avoid duplicate streamed response deltas#2285

Merged
abetlen merged 1 commit into
mainfrom
fix/responses-stream-first-token-dup
Jun 8, 2026
Merged

fix(example): avoid duplicate streamed response deltas#2285
abetlen merged 1 commit into
mainfrom
fix/responses-stream-first-token-dup

Conversation

@abetlen

@abetlen abetlen commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Fix streamed Responses API events from duplicating the first output delta.

  • Snapshot mutable output item and content part payloads before later stream-state mutations.
  • Covers reasoning text, normal output text, and tool call item-added events.
  • Validated with synthetic Responses stream chunks and python3 -m py_compile examples/server/server.py.

@abetlen abetlen merged commit a72325b into main Jun 8, 2026
15 checks passed
@abetlen abetlen deleted the fix/responses-stream-first-token-dup branch June 8, 2026 01:48
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.

1 participant