@ai-sdk/openai 4.0.0-canary.52 → 4.0.0-canary.54

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/openai
2
2
 
3
+ ## 4.0.0-canary.54
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d848405]
8
+ - @ai-sdk/provider-utils@5.0.0-canary.37
9
+
10
+ ## 4.0.0-canary.53
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [ca39020]
15
+ - @ai-sdk/provider-utils@5.0.0-canary.36
16
+
3
17
  ## 4.0.0-canary.52
4
18
 
5
19
  ### Patch Changes
@@ -671,7 +685,6 @@
671
685
  ### Patch Changes
672
686
 
673
687
  - 04c89b1: Provide Responses API providerMetadata types at the message / reasoning level.
674
-
675
688
  - Export the following types for use in client code:
676
689
  - `OpenaiResponsesProviderMetadata`
677
690
  - `OpenaiResponsesReasoningProviderMetadata`
@@ -752,7 +765,6 @@
752
765
  ### Patch Changes
753
766
 
754
767
  - 330bd92: Fix Responses `code_interpreter` annotations and add typed providerMetadata
755
-
756
768
  - Align Responses API `code_interpreter` annotation types with the official spec.
757
769
  - Add tests to ensure the overlapping parts of the Zod schemas used by `doGenerate` and `doStream` stay in sync.
758
770
  - Export the following types for use in client code:
package/dist/index.js CHANGED
@@ -7292,7 +7292,7 @@ var OpenAISkills = class {
7292
7292
  };
7293
7293
 
7294
7294
  // src/version.ts
7295
- var VERSION = true ? "4.0.0-canary.52" : "0.0.0-test";
7295
+ var VERSION = true ? "4.0.0-canary.54" : "0.0.0-test";
7296
7296
 
7297
7297
  // src/openai-provider.ts
7298
7298
  function createOpenAI(options = {}) {
@@ -238,7 +238,6 @@ The following provider options are available:
238
238
 
239
239
  - **truncation** _string_
240
240
  The truncation strategy to use for the model response.
241
-
242
241
  - Auto: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation.
243
242
  - disabled (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error.
244
243
 
@@ -701,7 +700,6 @@ The MCP tool can be configured with:
701
700
  - **allowedTools** _string[] | object_ (optional)
702
701
 
703
702
  Controls which tools from the MCP server are available. Can be:
704
-
705
703
  - An array of tool names: `['tool1', 'tool2']`
706
704
  - An object with filters:
707
705
  ```ts
@@ -722,7 +720,6 @@ The MCP tool can be configured with:
722
720
  - **requireApproval** _'always' | 'never' | object_ (optional)
723
721
 
724
722
  Controls which MCP tool calls require user approval before execution. Can be:
725
-
726
723
  - `'always'`: All MCP tool calls require approval
727
724
  - `'never'`: No MCP tool calls require approval (default)
728
725
  - An object with filters:
@@ -1324,7 +1321,6 @@ This metadata includes the following fields:
1324
1321
  If no annotations are present, this property itself may be omitted (`undefined`).
1325
1322
 
1326
1323
  Each element in `annotations` is a discriminated union with a required `type` field. Supported types include, for example:
1327
-
1328
1324
  - `url_citation`
1329
1325
  - `file_citation`
1330
1326
  - `container_file_citation`
@@ -1777,7 +1773,6 @@ Reasoning models currently only generate text, have several limitations, and are
1777
1773
  They support additional settings and response metadata:
1778
1774
 
1779
1775
  - You can use `providerOptions` to set
1780
-
1781
1776
  - the `reasoningEffort` option (or alternatively the `reasoningEffort` model setting), which determines the amount of reasoning the model performs.
1782
1777
 
1783
1778
  - You can use response `providerMetadata` to access the number of reasoning tokens that the model generated.
@@ -1809,7 +1804,6 @@ console.log('Usage:', {
1809
1804
  </Note>
1810
1805
 
1811
1806
  - You can control how system messages are handled by providerOptions `systemMessageMode`:
1812
-
1813
1807
  - `developer`: treat the prompt as a developer message (default for reasoning models).
1814
1808
  - `system`: keep the system message as a system-level instruction.
1815
1809
  - `remove`: remove the system message from the messages.
@@ -2501,10 +2495,7 @@ const { images } = await generateImage({
2501
2495
  You can pass optional `providerOptions` to the image model. These are prone to change by OpenAI and are model dependent. For example, the `gpt-image-1` model supports the `quality` option:
2502
2496
 
2503
2497
  ```ts
2504
- import {
2505
- openai,
2506
- type OpenAIImageModelGenerationOptions,
2507
- } from '@ai-sdk/openai';
2498
+ import { openai, type OpenAIImageModelGenerationOptions } from '@ai-sdk/openai';
2508
2499
  import { generateImage } from 'ai';
2509
2500
 
2510
2501
  const { image, providerMetadata } = await generateImage({
@@ -2525,7 +2516,6 @@ is available:
2525
2516
  - **images** _Array&lt;object&gt;_
2526
2517
 
2527
2518
  Array of image-specific metadata. Each image object may contain:
2528
-
2529
2519
  - `revisedPrompt` _string_ - The revised prompt that was actually used to generate the image (OpenAI may modify your prompt for safety or clarity)
2530
2520
  - `created` _number_ - The Unix timestamp (in seconds) of when the image was created
2531
2521
  - `size` _string_ - The size of the generated image. One of `1024x1024`, `1024x1536`, or `1536x1024`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/openai",
3
- "version": "4.0.0-canary.52",
3
+ "version": "4.0.0-canary.54",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@ai-sdk/provider": "4.0.0-canary.16",
39
- "@ai-sdk/provider-utils": "5.0.0-canary.35"
39
+ "@ai-sdk/provider-utils": "5.0.0-canary.37"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/node": "20.17.24",