Open
Description
The @openai/realtime-api-beta
SDK crashes when it receives a response.output_item.done
event for an unknown or missing item ID. Instead of checking if the item exists in its internal map, the SDK immediately tries to access properties like item.tool
, item.status
, or item.event_id
, causing a fatal error.
Here’s the stack trace:
Error: response.output_item.done: Item "item_BLqSTfYRcIduLcytDILia" not found
at response.output_item.done (/node_modules/@openai/realtime-api-beta/lib/conversation.js:171:15)
at RealtimeConversation.processEvent (/node_modules/@openai/realtime-api-beta/lib/conversation.js:295:27)
at handler (/node_modules/@openai/realtime-api-beta/lib/client.js:278:49)
at handlerWithDispatch (/node_modules/@openai/realtime-api-beta/lib/client.js:282:31)
at /node_modules/@openai/realtime-api-beta/lib/client.js:355:24
at RealtimeAPI.dispatch (/node_modules/@openai/realtime-api-beta/lib/event_handler.js:134:7)
at RealtimeAPI.receive (/node_modules/@openai/realtime-api-beta/lib/api.js:180:10)
at WebSocket.<anonymous> (/node_modules/@openai/realtime-api-beta/lib/api.js:131:14)
This crash kills the entire server. The SDK should gracefully skip missing item_id
s or log a warning, but currently does neither. Please fix this as it’s blocking production use of the Realtime API.
Metadata
Metadata
Assignees
Labels
No labels