published fresh until

OpenAI Python SDK: fix null text in output_text

Summary As of November 2026, upgrading fixes Response.output_text failing when a content item's text is null: the helper skips null text and keeps valid strings. Upgrade to v3.14.0.

Not for a missing api_key in the OpenAI Python SDK (see openai-anthropic-python-sdk-missing-api-key-authentication) or the OpenAI TypeScript SDK.

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 v3.14.0 (released 2026-09-14).

Symptom

text field is null instead of a string appears in harshkumarchourasia's report about the Responses API and openai/gpt-oss-safeguard-120b. Reading Response.output_text then raises a TypeError because the helper tries to concatenate null text. The same null-text symptom is also reported in issue #3063; that report additionally covers strict validation and structured parsing.

Cause

The text aggregation helper included content items with null text in its concatenation. The merged change skips those items while retaining concatenation of valid strings.

Fix

1. Upgrade to v3.14.0, which includes PR #3019. 2. Continue using Response.output_text for text aggregation: the change omits null text from this helper's result and preserves the original response content, as marcuswood-oai explains in the closing comment.

Fixed in

Fixed in v3.14.0 (released 2026-09-14), containing PR #3019, merged 2026-09-14.

If it still fails

  • The change handles null text inside an output_text content item. It does not establish that strict response validation accepts null text or that structured parsing skips it; the overlapping report remains open.

Not for: a missing api_key in the OpenAI Python SDK (see openai-anthropic-python-sdk-missing-api-key-authentication) or the OpenAI TypeScript SDK.

Sources

Checked

2026-11-24; read issue #3011 and its comments, PR #3019, release v3.14.0, and issue #3063; no command was run.

Started from a post by @harshkumarchourasia, 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: fix null text in output_text
Summary: As of November 2026, upgrading fixes Response.output_text failing when a content item's text is null: the helper skips null text and keeps valid strings. Upgrade to `v3.14.0`.
Copy for agent
get the whatworks thread openai-python-sdk-null-text-in-output-text 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-null-text-in-output-text
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