Skip to content

Azure OpenAI v1 Preview API Support - Endpoint URL Incompatibility #7372

Closed

Description

@tsuzaki430

Description

Hello,
Thank you for great AI SDK maintenance every time.
I found that Azure OpenAI the new API structure has changed endpoints.
So I wish it will be supported in AI SDK.

Summary

Vercel AI SDK currently uses the legacy Azure OpenAI endpoint format, which prevents users from accessing the latest api-version=preview features. Azure OpenAI has introduced a new v1 API architecture with different endpoint URLs that require AI SDK updates.

Background

Microsoft has significantly changed their Azure OpenAI API strategy starting May 2025. They introduced a new generation of v1 APIs.

References:

Compare Endpoints

New v1 API endpoint format (required for latest features):

* Chat Completions: POST {endpoint}/openai/v1/chat/completions?api-version=preview
* Embeddings: POST {endpoint}/openai/v1/embeddings?api-version=preview
* Responses: POST {endpoint}/openai/v1/responses?api-version=preview

Legacy endpoint format (currently used by Vercel AI SDK):

* Chat Completions: POST {endpoint}/openai/deployments/{deployment-id}/chat/completions?api-version=2025-04-01-preview
* Embeddings: POST {endpoint}/openai/deployments/{deployment-id}/embeddings?api-version=2025-04-01-preview
* Responses: POST {endpoint}/openai/responses?api-version=2025-04-01-preview
  • Please also confirm that "v1" has been added to the new endpoints.
  • And the old Responses API endpoint "v1" is not existing.

Impact

  • Users cannot access the latest Azure OpenAI features available in api-version=preview
  • Missing support for new Responses API capabilities like:
    • input PDF files streamTest on Responses API.

AI SDK Version

ai:5.0.0-beta.21
@ai-sdk/azure:2.0.0-beta.9
@ai-sdk/react:2.0.0-beta.21

Activity

  1. tsuzaki430 commented on Jul 17, 2025

    @tsuzaki430
    ContributorAuthor

    workaround (Responses API Only)

      const azure=createAzure({
        baseURL:`https://${resourceName}.openai.azure.com/openai/v1`,
        apiVersion:"preview",
        apiKey:env.AOAI_API_KEY,
      });
    
      const result = streamText({
        model: azure.responses('gpt-4o'),
        prompt
      });

    When I tried Responses API , the baseURL was available instead of the resourceName.


    ai:5.0.0-beta.21
    @ai-sdk/azure:2.0.0-beta.9

  2. added
    featureNew feature or request
    provider/azureIssues related to the @ai-sdk/azure provider
    and removed on Jul 18, 2025
  3. tsuzaki430 commented on Jul 20, 2025

    @tsuzaki430
    ContributorAuthor

    hello,
    Thank you for new azure provider build.
    I tried some AI SDK functions and share the result.

    V1 Preview API test result.

    API used function name test result
    Responses API (with PDF input) streamText in model.responses successfully finished
    Chat Completion API streamText in model.chat successfully finished
    Embedding API embed successfully finished
    Image Generation API generateImage successfully finished
    STT API transcribe failed
    TTS API none not exist speech function in AI SDK azure provider
    "@ai-sdk/azure": "2.0.0-beta.11",
    "@ai-sdk/react": "2.0.0-beta.24",
    "ai": "5.0.0-beta.24",
    

    I'm sorry , I couldn't finish transribe API successfully.
    I couldn't find where is the problem in my source or Azure API Infrastructure.

  4. dancer commented on Jul 22, 2025

    @dancer
    Collaborator

    will take a look at this soon thank you for the feedback

  5. Kobusvdwalt commented on Jul 28, 2025

    @Kobusvdwalt

    Hi there, I'm using
    "@ai-sdk/azure": "^2.0.0-beta.13",

    Our company has a deployment set up with these URLs
    /openai/deployments/gpt-4o/chat/completions
    /openai/deployments/gpt-41/chat/completions
    ...etc

    This means that I cannot use the new version as the /v1 is forced now in the azure sdk.
    Could we make this optional ? Or allow an override ?

    Engaging our internal team to deploy a prefixed set of endpoints seems more daunting, than asking here for a way to override that /v1 endpoint :P

  6. tsuzaki430 commented on Jul 29, 2025

    @tsuzaki430
    ContributorAuthor

    Hello @Kobusvdwalt

    We don't need to re-create deployments for /v1 endpoint.
    Existing deployments are available for /v1 endpoint.
    Your "gpt-4o" and "gpt-41" deployments no need to changed on Azure OpenAI portal.

    The newest Api-version is "preview".
    "preview" is for /v1 endpoint ,so you need use the new version, I think you should use /v1 endpoint.

  7. dancer commented on Jul 29, 2025

    @dancer
    Collaborator

    fix will be released with next patch - let me know if any issues

  8. tsuzaki430 commented on Jul 30, 2025

    @tsuzaki430
    ContributorAuthor

    @dancer
    Thank you for add speech model on azure provider.
    I checked speech function works successfully.
    But I couldn't see transcribe function success.

    V1 Preview API test result.

    API used function name test result
    STT API transcribe failed
    TTS API generateSpeech successfully finished

    transcribe function always show me this error.
    {"error":{"code":"DeploymentNotFound","message":"The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again."}}
    I checked whisper models many times.

    "@ai-sdk/azure": "2.0.0-beta.14",
    "@ai-sdk/react": "2.0.0-beta.32",
    "ai": "5.0.0-beta.32",
    
  9. dancer commented on Aug 12, 2025

    @dancer
    Collaborator

    so i merged a fix(will be released soon) sorry for the delayed @tsuzaki430 please take a look at #7985 and try the old format as i believe this is needed let me know if this resolves it and update me, thanks for waiting

  10. tsuzaki430 commented on Aug 13, 2025

    @tsuzaki430
    ContributorAuthor

    @dancer
    Thank you for fix!
    I didn't know that transcription API needs deployment-based URL.
    "useDeploymentBasedUrls" is good for us and I checked the "DeploymentNotFound" error was ended.
    But I met another error , so I close this issue and open the new issue #8013.

  11. added
    ai/providerrelated to a provider package. Must be assigned together with at least one `provider/*` label
    provider/openai-compatibleIssues related to the @ai-sdk/openai-compatible provider
    on Oct 15, 2025
  12. lgrammel commented on Jul 22, 2026

    @lgrammel
    Collaborator

    Identify issue type

    Identified as Feature
    Confidence: High

    Rationale

    This is primarily a request to add compatibility with Azure OpenAI's new v1 Preview API and its capabilities, making it new provider/API support rather than a documented-behavior failure.

    Evidence

    • The issue requests support for Azure OpenAI's new /openai/v1 preview API endpoint architecture, while the SDK used legacy deployment-based URLs.
    • The requested change enables newly available Azure preview features rather than correcting behavior promised for an already-supported endpoint format.
    • Maintainer comments indicate endpoint and speech support changes were implemented; a later transcription error was moved to separate issue Azure OpenAI Transcription "Unrecognized file format" Error #8013.
  13. added theissue type on Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ai/providerrelated to a provider package. Must be assigned together with at least one `provider/*` labelfeatureNew feature or requestprovider/azureIssues related to the @ai-sdk/azure providerprovider/openai-compatibleIssues related to the @ai-sdk/openai-compatible providertask-identify-issue-type-done

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions