Skip to content

Conversation

@LuminaX-alt
Copy link
Owner

Fix responses.parse failing in streaming mode

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Additional context & links

Fix responses.parse failing in streaming mode

- Added detection for partial streamed chunks in responses.parse
- Wraps streamed events into a minimal valid Response structure before Pydantic validation
- Prevents AttributeError/ValidationError when parsing incremental streaming payloads
- Maintains compatibility with non-streaming parse calls
- Closes openai#2305
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.

responses.parse returns an error in streaming mode

2 participants