Skip to content

fix: guard null output items in response streams#3126

Open
nightcityblade wants to merge 1 commit intoopenai:mainfrom
nightcityblade:fix/issue-3125
Open

fix: guard null output items in response streams#3126
nightcityblade wants to merge 1 commit intoopenai:mainfrom
nightcityblade:fix/issue-3125

Conversation

@nightcityblade
Copy link
Copy Markdown

Fixes #3125

Summary

  • ignore malformed response.output_item.added events when item is null instead of crashing the accumulator
  • add a regression test covering the null-item stream event case

Testing

  • pytest -o addopts="" tests/lib/responses/test_responses.py -q

@nightcityblade nightcityblade requested a review from a team as a code owner April 26, 2026 15:05
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 stream accumulator crashes when response.output_item.added has item=None

1 participant