Skip to content

fix: preserve error events in Assistants streaming helpers - #4164

Closed
marcuswood-oai wants to merge 1 commit into
mainfrom
fix/assistants-stream-event-envelope
Closed

marcuswood-oai wants to merge 1 commit into
mainfrom
fix/assistants-stream-event-envelope

Conversation

@marcuswood-oai

Copy link
Copy Markdown
Contributor

Preserve the event/data envelope for Assistants error events in runs.stream(), runs.submit_tool_outputs_stream(), and threads.create_and_run_stream(), matching the regular streaming methods. Set the existing request option in both sync and async helpers so errors arrive as ErrorEvent rather than an incomplete event or a validation failure.

One parameterized regression test covers the three helpers in both modes. All six cases fail before the fix and pass after it. Assistants and streaming suites pass with Pydantic v1 and v2 (81 passed, 34 skipped each). Changed-file lint, formatting, type checks, and the custom-code budget check pass.

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