Skip to content

Conversation

alessiopelliccione
Copy link

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

Changes being requested

While consuming streaming responses (e.g. client.responses.stream(...)), the final snapshot sometimes arrived without an output_text field, so stream.finalResponse() returned an object where output_text was undefined.
This meant downstream code had to manually concatenate deltas, even though non-streaming responses already provide output_text.

The fix ensures both maybeParseResponse branches rebuild the text when the payload lacks it (or sets it to null), using a small shared helper around the existing addOutputText logic.

Additional context & links

Fixes #1662

@alessiopelliccione alessiopelliccione requested a review from a team as a code owner October 12, 2025 19:06
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.

finalResponse() missing output_text field in streaming mode

1 participant