You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ai-sdk/azure calling the wrong url path for r1 deployment #4797
I've been having a similar issue when using a custom gateway to access Azure hosted LLMs. This is the URL that @ai-sdk/azure is creating after I've modified the baseURL, which is incorrect:
I've tried using a custom fetch implementation in an attempt to correct the URL, but passing a newUrl to the return fetch call does not change where the request is sent to and is also not a great way to fix this issue:
Marking this as closed for now - if you face any regression or have a similar problem after migrating to the latest AI SDK version, please feel free to open a new issue (with possible reproduction)
This describes concrete incorrect request URL construction in the existing Azure provider, causing requests to target endpoints different from those configured or required.
Evidence
The reporter states that @ai-sdk/azure constructs the wrong URL for an Azure-hosted R1 deployment by adding an OpenAI-specific path.
Another user provides concrete generated and expected URLs, showing that the SDK inserts an unwanted model/deployment segment and api-version query even when baseURL is customized.
Multiple commenters confirm the same behavior, and changing baseURL reportedly does not resolve it.
Activity
kevsjh commentedon Feb 13, 2025
Yes, im facing the same issue as well. Applying baseURL does not fix it
Genzo0 commentedon Feb 17, 2025
Does anyone find the solution for this problem ?
sahanatvessel commentedon Mar 3, 2025
@lgrammel any insights on this, please?
tobiasbueschel commentedon Mar 19, 2025
I've been having a similar issue when using a custom gateway to access Azure hosted LLMs. This is the URL that
@ai-sdk/azureis creating after I've modified thebaseURL, which is incorrect:This is the actual URL I need for my gateway:
I've tried using a custom fetch implementation in an attempt to correct the URL, but passing a newUrl to the return fetch call does not change where the request is sent to and is also not a great way to fix this issue:
Has anyone found a way to solve the above? Or should one use a custom provider for situation like this?
Thanks
Genzo0 commentedon Mar 19, 2025
its keep the openai completions in the url, for know i think its better to look at the other provider thats support your model
aayush-kapoor commentedon Jan 22, 2026
Marking this as closed for now - if you face any regression or have a similar problem after migrating to the latest AI SDK version, please feel free to open a new issue (with possible reproduction)
lgrammel commentedon Jul 22, 2026
Identify issue type
Identified as Bug
Confidence: High
Rationale
This describes concrete incorrect request URL construction in the existing Azure provider, causing requests to target endpoints different from those configured or required.
Evidence
@ai-sdk/azureconstructs the wrong URL for an Azure-hosted R1 deployment by adding an OpenAI-specific path.api-versionquery even whenbaseURLis customized.baseURLreportedly does not resolve it.