@ai-sdk/azure 3.0.134 → 3.0.136

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @ai-sdk/azure
2
2
 
3
+ ## 3.0.136
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [ce4202b]
8
+ - Updated dependencies [fde0b6c]
9
+ - @ai-sdk/openai@3.0.125
10
+
11
+ ## 3.0.135
12
+
13
+ ### Patch Changes
14
+
15
+ - ba91e05: feat(azure): support MAI-Image models through the MAI image API
16
+
3
17
  ## 3.0.134
4
18
 
5
19
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -52,11 +52,12 @@ interface AzureOpenAIProvider extends ProviderV3 {
52
52
  */
53
53
  textEmbeddingModel(deploymentId: string): EmbeddingModelV3;
54
54
  /**
55
- * Creates an Azure OpenAI DALL-E model for image generation.
55
+ * Creates an Azure image model. MAI-Image models use the MAI image API by
56
+ * default; other IDs use OpenAI. Override with providerOptions.azure.api.
56
57
  */
57
58
  image(deploymentId: string): ImageModelV3;
58
59
  /**
59
- * Creates an Azure OpenAI DALL-E model for image generation.
60
+ * Creates an Azure image model. Alias of `image`.
60
61
  */
61
62
  imageModel(deploymentId: string): ImageModelV3;
62
63
  /**
@@ -137,6 +138,11 @@ interface AzureOpenAIProviderSettings {
137
138
  * Speech requests do not use `baseURL` or `apiVersion`.
138
139
  */
139
140
  speechBaseURL?: string;
141
+ /**
142
+ * URL prefix for MAI image requests (MAI-Image generations and edits).
143
+ * Defaults to `https://{resourceName}.services.ai.azure.com/mai/v1`.
144
+ */
145
+ maiBaseURL?: string;
140
146
  }
141
147
  /**
142
148
  * Create an Azure OpenAI provider instance.
@@ -162,6 +168,13 @@ type AzureResponsesSourceDocumentProviderMetadata = {
162
168
 
163
169
  declare const VERSION: string;
164
170
 
171
+ declare const azureImageModelOptions: _ai_sdk_provider_utils.LazySchema<{
172
+ autoAspectRatio?: boolean | undefined;
173
+ webGrounding?: boolean | undefined;
174
+ api?: "openai" | "mai" | undefined;
175
+ }>;
176
+ type AzureImageModelOptions = InferSchema<typeof azureImageModelOptions>;
177
+
165
178
  declare const azureSpeechModelOptions: _ai_sdk_provider_utils.LazySchema<{
166
179
  style?: string | undefined;
167
180
  styleDegree?: number | undefined;
@@ -205,4 +218,4 @@ type AzureDeepSeekLanguageModelOptions = Omit<DeepSeekLanguageModelOptions, 'thi
205
218
  /** @deprecated Use `AzureDeepSeekLanguageModelOptions` instead. */
206
219
  type AzureDeepSeekChatOptions = AzureDeepSeekLanguageModelOptions;
207
220
 
208
- export { type AzureDeepSeekChatOptions, type AzureDeepSeekLanguageModelOptions, type AzureOpenAIProvider, type AzureOpenAIProviderSettings, type AzureResponsesProviderMetadata, type AzureResponsesReasoningProviderMetadata, type AzureResponsesSourceDocumentProviderMetadata, type AzureResponsesTextProviderMetadata, type AzureSpeechModelOptions, type AzureTranscriptionModelOptions, type AzureTranscriptionProviderMetadata, VERSION, azure, createAzure };
221
+ export { type AzureDeepSeekChatOptions, type AzureDeepSeekLanguageModelOptions, type AzureImageModelOptions, type AzureOpenAIProvider, type AzureOpenAIProviderSettings, type AzureResponsesProviderMetadata, type AzureResponsesReasoningProviderMetadata, type AzureResponsesSourceDocumentProviderMetadata, type AzureResponsesTextProviderMetadata, type AzureSpeechModelOptions, type AzureTranscriptionModelOptions, type AzureTranscriptionProviderMetadata, VERSION, azure, createAzure };
package/dist/index.d.ts CHANGED
@@ -52,11 +52,12 @@ interface AzureOpenAIProvider extends ProviderV3 {
52
52
  */
53
53
  textEmbeddingModel(deploymentId: string): EmbeddingModelV3;
54
54
  /**
55
- * Creates an Azure OpenAI DALL-E model for image generation.
55
+ * Creates an Azure image model. MAI-Image models use the MAI image API by
56
+ * default; other IDs use OpenAI. Override with providerOptions.azure.api.
56
57
  */
57
58
  image(deploymentId: string): ImageModelV3;
58
59
  /**
59
- * Creates an Azure OpenAI DALL-E model for image generation.
60
+ * Creates an Azure image model. Alias of `image`.
60
61
  */
61
62
  imageModel(deploymentId: string): ImageModelV3;
62
63
  /**
@@ -137,6 +138,11 @@ interface AzureOpenAIProviderSettings {
137
138
  * Speech requests do not use `baseURL` or `apiVersion`.
138
139
  */
139
140
  speechBaseURL?: string;
141
+ /**
142
+ * URL prefix for MAI image requests (MAI-Image generations and edits).
143
+ * Defaults to `https://{resourceName}.services.ai.azure.com/mai/v1`.
144
+ */
145
+ maiBaseURL?: string;
140
146
  }
141
147
  /**
142
148
  * Create an Azure OpenAI provider instance.
@@ -162,6 +168,13 @@ type AzureResponsesSourceDocumentProviderMetadata = {
162
168
 
163
169
  declare const VERSION: string;
164
170
 
171
+ declare const azureImageModelOptions: _ai_sdk_provider_utils.LazySchema<{
172
+ autoAspectRatio?: boolean | undefined;
173
+ webGrounding?: boolean | undefined;
174
+ api?: "openai" | "mai" | undefined;
175
+ }>;
176
+ type AzureImageModelOptions = InferSchema<typeof azureImageModelOptions>;
177
+
165
178
  declare const azureSpeechModelOptions: _ai_sdk_provider_utils.LazySchema<{
166
179
  style?: string | undefined;
167
180
  styleDegree?: number | undefined;
@@ -205,4 +218,4 @@ type AzureDeepSeekLanguageModelOptions = Omit<DeepSeekLanguageModelOptions, 'thi
205
218
  /** @deprecated Use `AzureDeepSeekLanguageModelOptions` instead. */
206
219
  type AzureDeepSeekChatOptions = AzureDeepSeekLanguageModelOptions;
207
220
 
208
- export { type AzureDeepSeekChatOptions, type AzureDeepSeekLanguageModelOptions, type AzureOpenAIProvider, type AzureOpenAIProviderSettings, type AzureResponsesProviderMetadata, type AzureResponsesReasoningProviderMetadata, type AzureResponsesSourceDocumentProviderMetadata, type AzureResponsesTextProviderMetadata, type AzureSpeechModelOptions, type AzureTranscriptionModelOptions, type AzureTranscriptionProviderMetadata, VERSION, azure, createAzure };
221
+ export { type AzureDeepSeekChatOptions, type AzureDeepSeekLanguageModelOptions, type AzureImageModelOptions, type AzureOpenAIProvider, type AzureOpenAIProviderSettings, type AzureResponsesProviderMetadata, type AzureResponsesReasoningProviderMetadata, type AzureResponsesSourceDocumentProviderMetadata, type AzureResponsesTextProviderMetadata, type AzureSpeechModelOptions, type AzureTranscriptionModelOptions, type AzureTranscriptionProviderMetadata, VERSION, azure, createAzure };