Skip to content

[BUG] RealtimeSessionClient.ReceiveUpdates throws NotImplementedException #1363

Description

@z0rimo

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

  1. Use OpenAI 2.13.0 or the current main branch.
  2. Obtain a RealtimeSessionClient.
  3. Call either synchronous ReceiveUpdates overload:
    • ReceiveUpdates(CancellationToken)
    • ReceiveUpdates(RequestOptions)
  4. Observe that the method throws NotImplementedException.
  5. 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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageWorkflow: This is a new issue that needs to be triaged.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions