Skip to content

fix(responses): skip parsing incomplete output text#3286

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

fix(responses): skip parsing incomplete output text#3286
nightcityblade wants to merge 1 commit into
openai:mainfrom
nightcityblade:fix/issue-2486

Conversation

@nightcityblade
Copy link
Copy Markdown

Fixes #2486.\n\nWhen a Responses API output message is marked incomplete, its output text may contain partial structured JSON. This skips text-format parsing for incomplete messages while preserving the output item, avoiding a validation error on partial content.\n\nTests:\n- uv run --with respx --with inline-snapshot --with pytest-asyncio --with time-machine --with dirty-equals pytest tests/lib/responses/test_responses.py -q -o addopts=""\n- uv run --with ruff ruff check src/openai/lib/_parsing/_responses.py tests/lib/responses/test_responses.py

@nightcityblade nightcityblade requested a review from a team as a code owner May 20, 2026 15:25
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.

Incomplete responses are not handled by parse_response when using Structured Output

1 participant