Skip to content

Handle Azure preview API versions#2876

Open
mrutunjay-kinagi wants to merge 1 commit intoopenai:mainfrom
mrutunjay-kinagi:azure-preview-api-version
Open

Handle Azure preview API versions#2876
mrutunjay-kinagi wants to merge 1 commit intoopenai:mainfrom
mrutunjay-kinagi:azure-preview-api-version

Conversation

@mrutunjay-kinagi
Copy link

@mrutunjay-kinagi mrutunjay-kinagi commented Feb 18, 2026

Summary

  • keep Azure preview/latest API versions from being rewritten to /deployments/{model} so we hit the new /openai/v1/... surface instead of the legacy deployments path
  • reuse the base URL directly when api_version is preview or latest, mirroring how Azure’s next-generation API expects requests to be structured
  • this fixes the NotFoundError that occurred whenever AzureOpenAI(..., api_version="preview") tried to reach /openai/deployments/.../chat/completions

Testing

  • not run (requires an Azure preview endpoint/deployment)

Closes #2584

@mrutunjay-kinagi mrutunjay-kinagi requested a review from a team as a code owner February 18, 2026 15:07
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.

AzureOpenAi is unable to process chat.completions when the API version is set to preview.

1 participant

Comments