Unable to change model for RealtimeClient in js

I have tried this:

const client = new RealtimeClient({
apiKey: process.env.OPENAI_API_KEY,
model: ‘gpt-4o-mini-realtime-preview-2024-12-17’,
});

and this:

client.updateSession({
model: ‘gpt-4o-mini-realtime-preview-2024-12-17’,
instructions: ‘Provide concise and accurate responses.’,
voice: ‘coral’, // Change to another voice like ‘nova’ if needed
response_mode: ‘audio’,
input_audio_transcription: { model: ‘whisper-1’ },
});

it keeps defaulting to the older 4o model.

what am i doing wrong?

finally it’s fixed thanks to this pr 103

1 Like

Can you please send the link for the relative pr? I don’t see any pull requests with such an id number in the repo

1 Like

here’s the link - Add ability to set realtime model by mandryllo · Pull Request #103 · openai/openai-realtime-api-beta · GitHub

2 Likes

Huge thanks for coming back to share the info with the rest of the community.

Have a great weekend!

1 Like