mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: upgrade @ai-sdk/azure to v3 and use deployment-based URLs
- Upgrade @ai-sdk/azure from ^2.0.6 to ^3.0.26
- v3 defaults provider(id) to Responses API (works for all models)
- v2 defaulted to Chat Completions, breaking codex models
- Add useDeploymentBasedUrls: true to createAzure()
- Produces /deployments/{id}/{path} URLs (universally compatible)
- Without it, SDK uses /v1/{path} which only works on AI Foundry resources
This commit is contained in:
parent
06dd495914
commit
562e9ea894
2 changed files with 6 additions and 2 deletions
|
|
@ -35,11 +35,15 @@ export class AzureHandler extends BaseProvider implements SingleCompletionHandle
|
|||
this.options = options
|
||||
|
||||
// Create the Azure provider using AI SDK
|
||||
// The @ai-sdk/azure package uses resourceName-based routing
|
||||
// The @ai-sdk/azure package uses resourceName-based routing.
|
||||
// useDeploymentBasedUrls produces the universally compatible
|
||||
// /deployments/{id}/{path} URL shape that works on both classic
|
||||
// Azure OpenAI resources and newer AI Foundry resources.
|
||||
this.provider = createAzure({
|
||||
resourceName: options.azureResourceName ?? "",
|
||||
apiKey: options.azureApiKey, // Optional — Azure supports managed identity / Entra ID auth
|
||||
apiVersion: options.azureApiVersion ?? azureOpenAiDefaultApiVersion,
|
||||
useDeploymentBasedUrls: true,
|
||||
headers: DEFAULT_HEADERS,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@ai-sdk/amazon-bedrock": "^4.0.50",
|
||||
"@ai-sdk/azure": "^2.0.6",
|
||||
"@ai-sdk/azure": "^3.0.26",
|
||||
"@ai-sdk/baseten": "^1.0.31",
|
||||
"@ai-sdk/cerebras": "^1.0.0",
|
||||
"@ai-sdk/deepseek": "^2.0.14",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue