Description
@ai-sdk/azure provider does not work since v1.3.4
here is my opencode.json config
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"foundary": {
"npm": "@ai-sdk/azure",
"options": {
"baseURL": "https://custom-domain/openai",
"apiKey": "xxxxxxxx",
"apiVersion": "2025-04-01-preview",
"useDeploymentBasedUrls": true,
"useCompletionUrls": true
},
"models": {
"gpt-5.4": {
"name": "GPT-5.4"
}
}
}
},
"autoupdate": false
}
I have looked up a lot of similar issue regarding azure openai api, seems like everyone is confuse about azure multiple supporting API format.
Expect:
POST: https://custom-domain/openai/deployments/{deployment-id}/chat/completions?api-version={api-version}
{
"model": "gpt-5.4",
"messages": [
...
],
...
}
Actual:
POST: https://custom-domain/openai/deployments/{deployment-id}/responses?api-version={api-version}
{
"model": "gpt-5.4",
"input": [
...
],
...
}
This line of code sdk.chat(modelID) should direct me to the chat completion method with useCompletionUrls options based on the logic
changing @ai-sdk/azure version to 3.0.49 in opencode v1.3.4 might cause this issue to appear
Plugins
No response
OpenCode version
v1.3.4
Steps to reproduce
- prepare a azure api that have (only) this API format available - https://custom-domain/openai/deployments/{deployment-id}/chat/completions?api-version={api-version}
- use opencode version v1.3.3 with this config - it works
- use opencode version v1.3.4 with same config - it does not works
Screenshot and/or share link
No response
Operating System
macOS
Terminal
WezTerm
Description
@ai-sdk/azureprovider does not work since v1.3.4here is my
opencode.jsonconfigI have looked up a lot of similar issue regarding azure openai api, seems like everyone is confuse about azure multiple supporting API format.
Expect:
POST: https://custom-domain/openai/deployments/{deployment-id}/chat/completions?api-version={api-version}
Actual:
POST: https://custom-domain/openai/deployments/{deployment-id}/responses?api-version={api-version}
This line of code sdk.chat(modelID) should direct me to the chat completion method with
useCompletionUrlsoptions based on the logicchanging
@ai-sdk/azureversion to 3.0.49 in opencode v1.3.4 might cause this issue to appearPlugins
No response
OpenCode version
v1.3.4
Steps to reproduce
Screenshot and/or share link
No response
Operating System
macOS
Terminal
WezTerm