Describe the bug
The synchronous RealtimeSessionClient.ReceiveUpdates APIs are part of the public API surface, but both currently throw NotImplementedException.
The affected overloads are:
ReceiveUpdates(CancellationToken)
ReceiveUpdates(RequestOptions)
The corresponding ReceiveUpdatesAsync overloads are implemented and use the existing WebSocket receive pipeline.
This is also inconsistent with other synchronous Realtime APIs such as SendCommand, which already use sync-over-async because ClientWebSocket does not expose a synchronous send operation.
The synchronous ReceiveUpdates methods are present in the released API surface, so callers can discover and invoke them normally, but they currently fail immediately.
I confirmed this on both OpenAI 2.13.0 and the current main branch.
If implementing the synchronous paths using the existing asynchronous WebSocket receive pipeline is the intended approach, I'd be happy to contribute a fix and regression coverage.
Steps to reproduce
- Use OpenAI 2.13.0 or the current
main branch.
- Obtain a
RealtimeSessionClient.
- Call either synchronous
ReceiveUpdates overload:
ReceiveUpdates(CancellationToken)
ReceiveUpdates(RequestOptions)
- Observe that the method throws
NotImplementedException.
- Compare with the corresponding
ReceiveUpdatesAsync overloads, which are implemented.
Code snippets
#pragma warning disable OPENAI002
using System.ClientModel;
using OpenAI.Realtime;
var session = new TestRealtimeSessionClient();
// Throws NotImplementedException.
_ = session.ReceiveUpdates();
sealed class TestRealtimeSessionClient : RealtimeSessionClient
{
public TestRealtimeSessionClient()
: base(
new ApiKeyCredential("test"),
new Uri("wss://example.com"),
"gpt-realtime",
intent: null,
parentClient: null)
{
}
}
OS
Windows 11
.NET version
10.0.109
Library version
OpenAI 2.13.0 and current main (19d0a3c)
Describe the bug
The synchronous
RealtimeSessionClient.ReceiveUpdatesAPIs are part of the public API surface, but both currently throwNotImplementedException.The affected overloads are:
ReceiveUpdates(CancellationToken)ReceiveUpdates(RequestOptions)The corresponding
ReceiveUpdatesAsyncoverloads are implemented and use the existing WebSocket receive pipeline.This is also inconsistent with other synchronous Realtime APIs such as
SendCommand, which already use sync-over-async becauseClientWebSocketdoes not expose a synchronous send operation.The synchronous
ReceiveUpdatesmethods are present in the released API surface, so callers can discover and invoke them normally, but they currently fail immediately.I confirmed this on both OpenAI 2.13.0 and the current
mainbranch.If implementing the synchronous paths using the existing asynchronous WebSocket receive pipeline is the intended approach, I'd be happy to contribute a fix and regression coverage.
Steps to reproduce
mainbranch.RealtimeSessionClient.ReceiveUpdatesoverload:ReceiveUpdates(CancellationToken)ReceiveUpdates(RequestOptions)NotImplementedException.ReceiveUpdatesAsyncoverloads, which are implemented.Code snippets
OS
Windows 11
.NET version
10.0.109
Library version
OpenAI 2.13.0 and current main (19d0a3c)