Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Realtime API URL is generated wrong based on a endpoint #2120

Open
1 task done
eavanvalkenburg opened this issue Feb 14, 2025 · 1 comment
Open
1 task done
Labels
bug Something isn't working

Comments

@eavanvalkenburg
Copy link
Contributor

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

The AzureOpenAI client generates the wrong URL for the realtime websocket connection when creating the client with a azure_endpoint and azure_deployment:

  • it generates: wss://<azure_endpoint without https://>/openai/deployments/<azure_deployment)/realtime?model=<model_param>&api-version=2024-10-01-preview&deployment=<model_param>
  • it should generate: wss://<azure_endpoint without https://>/openai/realtime?model=<model_param>&api-version=2024-10-01-preview&deployment=<azure_deployment>

When not passing azure_deployment to the client it does work!

To Reproduce

  1. Create a AzureOpenAI client with endpoint and deployment
  2. Connect to realtime api

Code snippets

OS

MacOS

Python version

Python 3.13.1

Library version

openai v1.61.1

@Programmer-RD-AI
Copy link

Hi @eavanvalkenburg,

I’ve set up a PR (#2123) that addresses this issue. The PR updates both the synchronous and asynchronous realtime configuration methods to ensure the correct azure_deployment is used in the URL. I also added a check to raise an error if azure_deployment isn’t provided, preventing any misconfigurations.

All tests have been run and passed successfully, so everything looks good from my end. Feel free to take a look at the PR and let me know if you have any questions or further feedback.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants