Open
Description
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
- Call the Responses API with a request that triggers a
file_search
annotation. - Inspect the annotations in the response.
- Notice that
file_search
results are incorrectly labeled asResponseAudioDeltaEvent
.
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