Skip to content

BUG : file_search annotations are coming up as ResponseAudioDeltaEvent #2383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
dominpm opened this issue May 27, 2025 · 4 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@dominpm
Copy link

dominpm commented May 27, 2025

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

When using the Responses API, file_search annotations are being returned as ResponseAudioDeltaEvent instead of the expected annotation type. This appears to be a bug in how file search events are handled in the response payload.

Expected Behavior

file_search annotations should be returned with their correct event type (e.g., FileSearchEvent), not as ResponseAudioDeltaEvent.

Actual Behavior

All file_search annotations are appearing as ResponseAudioDeltaEvent in the response annotations.

To Reproduce

  1. Call the Responses API with a request that triggers a file_search annotation.
  2. Inspect the annotations in the response.
  3. Notice that file_search results are incorrectly labeled as ResponseAudioDeltaEvent.

Code snippets

ResponseAudioDeltaEvent(delta=None, sequence_number=345, type='response.output_text.annotation.added', item_id='XX', output_index=1, content_index=0, annotation_index=3, annotation={'type': 'file_citation', 'file_id': 'file-XX', 'filename': 'XX.pdf', 'index': 1364})

OS

Windows

Python version

v3.12.0

Library version

v1.82.0

@dominpm
Copy link
Author

dominpm commented May 27, 2025

Also happening on code_interpreter #2382

@jihun-im-open
Copy link

web_search_preview as well. and ResponseTextAnnotationDeltaEvent is removed from openai.types.responses

@AnneMayor
Copy link

I am trying to figure out the problem and fix it. I will let you know til this weekend(~6.8)

@tancredibosi
Copy link

I also confirm to have the same issue, obtaining the event.type 'response.output_text.annotation.added' instead of the expected 'response.output_text_annotation.added' that is documented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants