Open AI realtime WS connections are cut off continuously

Now all of a sudden without any code changes all of our connections are cut off with the following error

OpenAI WS closed: code=4000 reason=invalid_request_error.beta_api_shape_disabled

Not sure what is going on. Anyone else experiencing this right now.

We are trying to connect to this url :

[Bridge] Connecting to OpenAI: url=wss://api.openai.com/v1/realtime model=gpt-realtime headers={“OpenAI-Beta”:“realtime=v1”}

Yes, I can reproduce this.

With OpenAI-Beta: realtime=v1, the WebSocket upgrade succeeds, but OpenAI then sends an error event and closes the connection with:

code=4000
reason=invalid_request_error.beta_api_shape_disabled

Using the same endpoint and model without the beta header succeeds and returns session.created.

So the practical next step appears to be removing:

OpenAI-Beta: realtime=v1

And then updating any beta Realtime event or session shapes to the GA version.

thanks vb, i’m updating it but there’s quite a few changes need to happen, unless i’m mistaken. I se a lot of configurations have changed, ex: audio format strings shouild be audio/pcm instead of pcm16 etc.

I agree. The confusing part is that the Realtime API Beta was already deprecated on May 12, so you will need to update your code either way.
But this delay caught me by surprise as well.

Here is the deprecations page, which also includes a link to the migration guide.