Kaynağa Gözat

fix: pass both 'openai' and 'azure' providerOptions keys for @ai-sdk/azure (#20272)

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
Corné Steenhuis 1 hafta önce
ebeveyn
işleme
9965d385de
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. 6 0
      packages/opencode/src/provider/transform.ts

+ 6 - 0
packages/opencode/src/provider/transform.ts

@@ -936,6 +936,12 @@ export namespace ProviderTransform {
     }
 
     const key = sdkKey(model.api.npm) ?? model.providerID
+    // @ai-sdk/azure delegates to OpenAIChatLanguageModel which reads from
+    // providerOptions["openai"], but OpenAIResponsesLanguageModel checks
+    // "azure" first. Pass both so model options work on either code path.
+    if (model.api.npm === "@ai-sdk/azure") {
+      return { openai: options, azure: options }
+    }
     return { [key]: options }
   }