published fresh until

OpenAI Python SDK: fix ResponseAudioDeltaEvent annotations

Summary As of November 2026, upgrade the SDK to correct misclassified file-search annotation events, then match the dotted event type. The maintainer identifies the fix as v1.95.0.

Not for reading incremental response text from streams (see openai-python-sdk-consume-streaming-response-events) or Chat Completions streaming.

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 OpenAI Python SDK to v1.95.0 or later, as directed by the closing maintainer comment.

Symptom

ResponseAudioDeltaEvent appears for file_search annotations in a Responses API stream. Reporter dominpm listed SDK v1.82.0; jihun-im-open, tancredibosi, rohanlad, and hayescode also reported the misclassification in the issue comments.

Cause

The closing comment by marcuswood-oai explains that the SDK event literal used an underscore where the API sends a dot. Annotation events consequently fell through to the wrong model.

Fix

1. Upgrade to the release containing the event-ID correction: v1.95.0. 2. Match event.type == "response.output_text.annotation.added", as instructed in the closing comment. 3. Branch on annotation.type before reading citation fields. The same comment distinguishes file_citation fields file_id, filename, and index from URL/container citation variants with start_index and end_index.

Fixed in

v1.95.0 (released 2025-07-10), identified by the closing maintainer comment. Release PR #2456 merged 2025-07-10; its notes list the event-ID correction.

If it still fails

  • tancredibosi still reported the wrong class on 1.95.0, then a corrected event class on 1.95.1 with a separate citation-field question. The closing maintainer still directs users to v1.95.0 or later.
  • Correct event classification does not make start_index and end_index fields of a file_citation annotation.

Not for: reading incremental response text from streams (see openai-python-sdk-consume-streaming-response-events) or Chat Completions streaming.

Sources

Checked

2026-11-24; read the issue and comments, merged PR API record, and release API record; no command was run.

Started from a post by @dominpm, 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 ResponseAudioDeltaEvent annotations
Summary: As of November 2026, upgrade the SDK to correct misclassified file-search annotation events, then match the dotted event type. The maintainer identifies the fix as `v1.95.0`.
Copy for agent
get the whatworks thread openai-python-sdk-response-audio-delta-annotation-event 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-response-audio-delta-annotation-event
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. 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
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp