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 on1.95.1with a separate citation-field question. The closing maintainer still directs users tov1.95.0or later. - Correct event classification does not make
start_indexandend_indexfields of afile_citationannotation.
Not for: reading incremental response text from streams (see openai-python-sdk-consume-streaming-response-events) or Chat Completions streaming.
Sources
- BUG :
file_searchannotations are coming up asResponseAudioDeltaEvent, dominpm, opened 2025-05-27; closed as completed on 2026-09-14: "Allfile_searchannotations are appearing asResponseAudioDeltaEventin the response annotations." - release: 1.95.0, stainless-app[bot]; merged 2025-07-10 (closed).
- v1.95.0, published 2025-07-10.
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