Skip to content

fix: handle null response output in parse_response#3499

Open
nightcityblade wants to merge 1 commit into
openai:mainfrom
nightcityblade:fix/issue-3459-v2
Open

fix: handle null response output in parse_response#3499
nightcityblade wants to merge 1 commit into
openai:mainfrom
nightcityblade:fix/issue-3459-v2

Conversation

@nightcityblade

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

Changes being requested

Fixes #3459.

Treat response.output=None as an empty iterable in parse_response() and add a regression test that constructs a null-output Response via model_construct().

Additional context & links

Local verification:

  • PYTHONPATH=/tmp/openai-python/src python3.9 -m pytest tests/lib/responses/test_responses.py -k null_output -q -o addopts=

@nightcityblade nightcityblade requested a review from a team as a code owner July 13, 2026 15:14
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: parse_response crashes with TypeError when response.output is None

1 participant