@ai-sdk/azure 3.0.134 → 3.0.135
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 +6 -0
- package/dist/index.d.mts +16 -3
- package/dist/index.d.ts +16 -3
- package/dist/index.js +364 -80
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +372 -74
- package/dist/index.mjs.map +1 -1
- package/docs/04-azure.mdx +68 -1
- package/package.json +4 -3
- package/src/azure-image-model-options.ts +34 -0
- package/src/azure-mai-image-model-options.ts +27 -0
- package/src/azure-mai-image-model.ts +259 -0
- package/src/azure-openai-provider.ts +87 -10
- package/src/index.ts +1 -0
package/CHANGELOG.md
CHANGED
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
|
|
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
|
|
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
|
|
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
|
|
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 };
|