Skip to content

Fix swapped Azure endpoint hostname in examples/azure.py#3298

Open
aryanmotgi wants to merge 1 commit into
openai:mainfrom
aryanmotgi:fix-azure-endpoint-example
Open

Fix swapped Azure endpoint hostname in examples/azure.py#3298
aryanmotgi wants to merge 1 commit into
openai:mainfrom
aryanmotgi:fix-azure-endpoint-example

Conversation

@aryanmotgi
Copy link
Copy Markdown

The second AzureOpenAI client in examples/azure.py uses https://example-resource.azure.openai.com/, but Azure OpenAI endpoints live at {resource}.openai.azure.com — the subdomain order is swapped.

The first example client in the same file (a few lines up) already uses the correct example-endpoint.openai.azure.com form, and the Microsoft docs URL in the adjacent comment also references openai.azure.com. So this is a typo in a single line, not a different style.

Users copy-pasting the example will hit DNS or TLS errors when trying it against a real resource.

Scope: this PR touches only the example. tests/lib/test_azure.py has the same swapped form in fixture URLs, but those values are opaque to the assertions, so they are intentionally left out of this PR to keep the diff narrow.

The second AzureOpenAI client example used the hostname
example-resource.azure.openai.com, but Azure OpenAI resources live at
{resource}.openai.azure.com. The sibling example above (line 11)
already uses the correct openai.azure.com form, as do the Microsoft
docs linked in the comment.
@aryanmotgi aryanmotgi requested a review from a team as a code owner May 22, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant