Skip to content

fix: guard response parsing for null output#3465

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

fix: guard response parsing for null output#3465
nightcityblade wants to merge 1 commit into
openai:mainfrom
nightcityblade:fix/issue-3459

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

Guard parse_response() against response.output=None by iterating over response.output or [] instead of assuming a list is always present. Added a regression test covering Response.model_construct(output=None).

Fixes #3459.

Additional context & links

Local test run:

  • PYTHONPATH=src python3.11 -m pytest tests/lib/test_responses_parsing.py -q -n0

@nightcityblade nightcityblade requested a review from a team as a code owner July 3, 2026 03:29
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