@ai-sdk/azure 4.0.78 → 4.0.79
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 +8 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/04-azure.mdx +48 -0
- package/package.json +2 -2
- package/src/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @ai-sdk/azure
|
|
2
2
|
|
|
3
|
+
## 4.0.79
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ca31b89: Export `OpenAIResponsesSystemMessageOptions` for typed message-level reasoning effort updates in Azure Responses models.
|
|
8
|
+
- Updated dependencies [ca31b89]
|
|
9
|
+
- @ai-sdk/openai@4.0.75
|
|
10
|
+
|
|
3
11
|
## 4.0.78
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeepSeekLanguageModelChatOptions } from '@ai-sdk/deepseek';
|
|
2
|
-
export { OpenAILanguageModelChatOptions as OpenAIChatLanguageModelOptions, OpenAILanguageModelChatOptions, OpenAILanguageModelResponsesOptions, OpenAILanguageModelResponsesOptions as OpenAIResponsesProviderOptions } from '@ai-sdk/openai';
|
|
2
|
+
export { OpenAILanguageModelChatOptions as OpenAIChatLanguageModelOptions, OpenAILanguageModelChatOptions, OpenAILanguageModelResponsesOptions, OpenAILanguageModelResponsesOptions as OpenAIResponsesProviderOptions, OpenAIResponsesSystemMessageOptions } from '@ai-sdk/openai';
|
|
3
3
|
import { ProviderV4, LanguageModelV4, EmbeddingModelV4, ImageModelV4, TranscriptionModelV4, SpeechModelV4 } from '@ai-sdk/provider';
|
|
4
4
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
5
5
|
import { codeInterpreter, fileSearch, imageGeneration, webSearch, webSearchPreview, ResponsesProviderMetadata, ResponsesReasoningProviderMetadata, ResponsesSourceDocumentProviderMetadata, ResponsesTextProviderMetadata } from '@ai-sdk/openai/internal';
|
package/dist/index.js
CHANGED
package/docs/04-azure.mdx
CHANGED
|
@@ -419,6 +419,54 @@ The following Azure-specific metadata may be returned:
|
|
|
419
419
|
not supported when using 'azure.chat' or 'azure.completion'
|
|
420
420
|
</Note>
|
|
421
421
|
|
|
422
|
+
#### Changing Reasoning Effort Mid-Conversation
|
|
423
|
+
|
|
424
|
+
Azure Responses models support message-level reasoning effort updates through
|
|
425
|
+
`providerOptions.azure.reasoningEffortUpdate`. The `openai` namespace is also
|
|
426
|
+
accepted when the message has no `azure` options. Use the
|
|
427
|
+
`OpenAIResponsesSystemMessageOptions` type exported from `@ai-sdk/azure` to
|
|
428
|
+
validate these options:
|
|
429
|
+
|
|
430
|
+
```ts
|
|
431
|
+
import { azure, type OpenAIResponsesSystemMessageOptions } from '@ai-sdk/azure';
|
|
432
|
+
import { generateText } from 'ai';
|
|
433
|
+
|
|
434
|
+
const result = await generateText({
|
|
435
|
+
// Use the name of your GPT-6 deployment.
|
|
436
|
+
model: azure.responses('gpt-6-astra'),
|
|
437
|
+
reasoning: 'low',
|
|
438
|
+
allowSystemInMessages: true,
|
|
439
|
+
messages: [
|
|
440
|
+
{
|
|
441
|
+
role: 'system',
|
|
442
|
+
content: '',
|
|
443
|
+
providerOptions: {
|
|
444
|
+
azure: {
|
|
445
|
+
reasoningEffortUpdate: 'high',
|
|
446
|
+
} satisfies OpenAIResponsesSystemMessageOptions,
|
|
447
|
+
},
|
|
448
|
+
},
|
|
449
|
+
{ role: 'user', content: 'Analyze the failure modes of this migration.' },
|
|
450
|
+
],
|
|
451
|
+
});
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
Keep the request-level `reasoning` unchanged throughout the conversation and
|
|
455
|
+
retain earlier effort updates when resending message history. These updates
|
|
456
|
+
also work with `streamText`. See the [OpenAI reasoning effort
|
|
457
|
+
guide](/providers/ai-sdk-providers/openai#changing-reasoning-effort-mid-conversation)
|
|
458
|
+
for continuation, compaction, and configuration restrictions.
|
|
459
|
+
|
|
460
|
+
<Note>
|
|
461
|
+
The SDK infers support for effort updates from the deployment name passed to
|
|
462
|
+
`azure.responses()`. The name must identify a supported GPT-6-or-later model
|
|
463
|
+
family, such as `gpt-6-astra`. A custom name such as `production` is not
|
|
464
|
+
recognized, even when the underlying deployment runs GPT-6. In that case,
|
|
465
|
+
message-level updates throw, and request-level updates are omitted with a
|
|
466
|
+
warning. Setting `forceReasoning: true` does not override this capability
|
|
467
|
+
check.
|
|
468
|
+
</Note>
|
|
469
|
+
|
|
422
470
|
#### Web Search Tool
|
|
423
471
|
|
|
424
472
|
The Azure OpenAI responses API supports web search through the `azure.tools.webSearch` tool.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/azure",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.79",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@ai-sdk/deepseek": "3.0.52",
|
|
33
|
-
"@ai-sdk/openai": "4.0.
|
|
33
|
+
"@ai-sdk/openai": "4.0.75",
|
|
34
34
|
"@ai-sdk/provider": "4.0.18",
|
|
35
35
|
"@ai-sdk/provider-utils": "5.0.47"
|
|
36
36
|
},
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type AzureDeepSeekLanguageModelOptions = Omit<
|
|
|
8
8
|
export type AzureDeepSeekChatOptions = AzureDeepSeekLanguageModelOptions;
|
|
9
9
|
export type {
|
|
10
10
|
OpenAILanguageModelResponsesOptions,
|
|
11
|
+
OpenAIResponsesSystemMessageOptions,
|
|
11
12
|
/** @deprecated Use `OpenAILanguageModelResponsesOptions` instead. */
|
|
12
13
|
OpenAILanguageModelResponsesOptions as OpenAIResponsesProviderOptions,
|
|
13
14
|
OpenAILanguageModelChatOptions,
|