AsyncRealtimeConnectionManager.send() / RealtimeConnectionManager.send() call json.dumps(event) on dict payloads, but post-connect connection.send() uses maybe_transform() which strips Omit/NotGiven.
Repro:
manager = client.realtime.connect(model="gpt-4o-realtime-preview")
manager.send({"type": "response.cancel", "event_id": omit})
# TypeError: Object of type Omit is not JSON serializable
PR incoming with regression test.
AsyncRealtimeConnectionManager.send()/RealtimeConnectionManager.send()calljson.dumps(event)on dict payloads, but post-connectconnection.send()usesmaybe_transform()which stripsOmit/NotGiven.Repro:
PR incoming with regression test.