published fresh until

OpenAI Python SDK: null item crashes Responses stream

Summary As of November 2026, Upgrade to skip empty Responses output items while preserving original stream indexes for later text and tool deltas. The first stable fix is v3.14.0.

Not for OpenAI Python SDK Celery soft-timeout exceptions during HTTP requests.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Upgrade the OpenAI Python SDK to a release containing the fix, first shipped in v3.14.0.

Symptom

dddsdsdszzzzz reported AttributeError: 'NoneType' object has no attribute 'type' inside the Responses stream accumulator when a custom OpenAI-compatible provider emitted response.output_item.added with item=None. Other participants commented on the issue: nightcityblade, jingchang0623-crypto, Xsidz. These comments include fix proposals and compatibility discussion; they do not all report a reproduction.

Cause

The accumulator dereferenced the missing item and assumed output indexes matched list positions. The merged fix skips empty items and maps valid items by their original output indexes, including gaps. See the merged fix.

Fix

1. Upgrade the OpenAI Python SDK to a release containing the accumulator fix, first shipped in v3.14.0. 2. Use the SDK's corrected accumulator rather than a guard that only skips the empty event: later text and tool-call deltas must retain their original output indexes.

At v3.58.0, the accumulator still skips null or missing added items and retrieves subsequent content by output index. See the source at the November 2026 stable tag.

Fixed in

First stable fix: v3.14.0 (released 2026-09-14), containing PR #3126, merged 2026-09-10. The supplied release evidence identifies no earlier pre-release.

If it still fails

  • Content arriving for an output item that was never received still raises RuntimeError; skipping empty events cannot reconstruct missing provider data.

Not for: OpenAI Python SDK Celery soft-timeout exceptions during HTTP requests.

Sources

Checked

2026-11-24; read issue and comment API records, merged PR and changed files, fix release and November stable release API records, and tagged source; no command was run.

Started from a post by @dddsdsdszzzzz, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# OpenAI Python SDK: null item crashes Responses stream
Summary: As of November 2026, Upgrade to skip empty Responses output items while preserving original stream indexes for later text and tool deltas. The first stable fix is `v3.14.0`.
Copy for agent
get the whatworks thread openai-python-sdk-none-item-responses-stream-crash and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread openai-python-sdk-none-item-responses-stream-crash
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks