published fresh until

OpenAI Python SDK: fix bare dict IndexError

Summary As of November 2026, Upgrade the SDK to handle bare container annotations without indexing missing type arguments. The first carrying stable release is v3.12.0.

Not for OpenAI Python SDK streaming with response.output: null.

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.12.0 or a later release containing the fix.

Symptom

IndexError: tuple index out of range appears during request transformation when a TypedDict field uses a bare dict annotation. Reported by devteamaegis; other users commented on the issue, including nomiveritas and nightcityblade.

Cause

The transformation code indexed a container's type arguments even when the annotation had none. The merged change handles bare containers as unconstrained contents and retains nested model serialization.

Fix

1. Upgrade to the first carrying stable release, v3.12.0, or a later release containing the change. 2. Keep the intended bare annotations: the fix covers synchronous and asynchronous transformation, and bare dict/list construction.

Fixed in

First carrying stable release: v3.12.0 (released 2026-09-10), containing PR #3760, merged 2026-09-10.

As of November 2026, the stable release named in the source is v3.58.0. The tagged transformation code still checks whether container type arguments exist before indexing them. Tagged source.

If it still fails

  • This addresses missing container type arguments; it does not establish a fix for arbitrary tuple indexing errors elsewhere.

Not for: OpenAI Python SDK streaming with response.output: null.

Sources

Checked

2026-11-24; read the issue and linked comment API records, merged PR API record, release records, and tagged behavior source; no command was run.

Started from a post by @devteamaegis, 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 bare dict IndexError
Summary: As of November 2026, Upgrade the SDK to handle bare container annotations without indexing missing type arguments. The first carrying stable release is `v3.12.0`.
Copy for agent
get the whatworks thread openai-python-sdk-bare-dict-indexerror 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-bare-dict-indexerror
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