@ai-sdk/openai 2.0.0-beta.2 → 2.0.0-beta.4

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,18 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 2.0.0-beta.4
4
+
5
+ ### Patch Changes
6
+
7
+ - b3c3450: feat (provider/openai): add support for encrypted_reasoning to responses api
8
+ - ad2a3d5: feat(provider/openai): add missing reasoning models to responses API
9
+
10
+ ## 2.0.0-beta.3
11
+
12
+ ### Major Changes
13
+
14
+ - efc3a62: fix (provider/openai): default strict mode to false
15
+
3
16
  ## 2.0.0-beta.2
4
17
 
5
18
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -44,7 +44,8 @@ type OpenAIConfig = {
44
44
  generateId?: () => string;
45
45
  };
46
46
 
47
- type OpenAIResponsesModelId = 'o1' | 'o1-2024-12-17' | 'o1-mini' | 'o1-mini-2024-09-12' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'o4-mini' | 'o4-mini-2025-04-16' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo-preview' | 'gpt-4-0125-preview' | 'gpt-4-1106-preview' | 'gpt-4' | 'gpt-4-0613' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | (string & {});
47
+ declare const openaiResponsesModelIds: readonly ["gpt-4.1", "gpt-4.1-2025-04-14", "gpt-4.1-mini", "gpt-4.1-mini-2025-04-14", "gpt-4.1-nano", "gpt-4.1-nano-2025-04-14", "gpt-4o", "gpt-4o-2024-05-13", "gpt-4o-2024-08-06", "gpt-4o-2024-11-20", "gpt-4o-audio-preview", "gpt-4o-audio-preview-2024-10-01", "gpt-4o-audio-preview-2024-12-17", "gpt-4o-search-preview", "gpt-4o-search-preview-2025-03-11", "gpt-4o-mini-search-preview", "gpt-4o-mini-search-preview-2025-03-11", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-turbo-preview", "gpt-4-0125-preview", "gpt-4-1106-preview", "gpt-4", "gpt-4-0613", "gpt-4.5-preview", "gpt-4.5-preview-2025-02-27", "gpt-3.5-turbo-0125", "gpt-3.5-turbo", "gpt-3.5-turbo-1106", "chatgpt-4o-latest", "o1", "o1-2024-12-17", "o1-mini", "o1-mini-2024-09-12", "o1-preview", "o1-preview-2024-09-12", "o3-mini", "o3-mini-2025-01-31", "o3", "o3-2025-04-16", "o4-mini", "o4-mini-2025-04-16", "codex-mini-latest", "computer-use-preview"];
48
+ type OpenAIResponsesModelId = (typeof openaiResponsesModelIds)[number] | (string & {});
48
49
 
49
50
  declare class OpenAIResponsesLanguageModel implements LanguageModelV2 {
50
51
  readonly specificationVersion = "v2";
@@ -64,13 +65,16 @@ declare const openaiResponsesProviderOptionsSchema: z.ZodObject<{
64
65
  store: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
65
66
  user: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
67
  reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
67
- strictSchemas: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
68
+ strictJsonSchema: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
68
69
  instructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
70
  reasoningSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
71
  serviceTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
71
72
  auto: "auto";
72
73
  flex: "flex";
73
74
  }>>>;
75
+ include: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
76
+ "reasoning.encrypted_content": "reasoning.encrypted_content";
77
+ }>>>>;
74
78
  }, z.core.$strip>;
75
79
  type OpenAIResponsesProviderOptions = z.infer<typeof openaiResponsesProviderOptionsSchema>;
76
80
 
package/dist/index.d.ts CHANGED
@@ -44,7 +44,8 @@ type OpenAIConfig = {
44
44
  generateId?: () => string;
45
45
  };
46
46
 
47
- type OpenAIResponsesModelId = 'o1' | 'o1-2024-12-17' | 'o1-mini' | 'o1-mini-2024-09-12' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'o4-mini' | 'o4-mini-2025-04-16' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo-preview' | 'gpt-4-0125-preview' | 'gpt-4-1106-preview' | 'gpt-4' | 'gpt-4-0613' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | (string & {});
47
+ declare const openaiResponsesModelIds: readonly ["gpt-4.1", "gpt-4.1-2025-04-14", "gpt-4.1-mini", "gpt-4.1-mini-2025-04-14", "gpt-4.1-nano", "gpt-4.1-nano-2025-04-14", "gpt-4o", "gpt-4o-2024-05-13", "gpt-4o-2024-08-06", "gpt-4o-2024-11-20", "gpt-4o-audio-preview", "gpt-4o-audio-preview-2024-10-01", "gpt-4o-audio-preview-2024-12-17", "gpt-4o-search-preview", "gpt-4o-search-preview-2025-03-11", "gpt-4o-mini-search-preview", "gpt-4o-mini-search-preview-2025-03-11", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-turbo-preview", "gpt-4-0125-preview", "gpt-4-1106-preview", "gpt-4", "gpt-4-0613", "gpt-4.5-preview", "gpt-4.5-preview-2025-02-27", "gpt-3.5-turbo-0125", "gpt-3.5-turbo", "gpt-3.5-turbo-1106", "chatgpt-4o-latest", "o1", "o1-2024-12-17", "o1-mini", "o1-mini-2024-09-12", "o1-preview", "o1-preview-2024-09-12", "o3-mini", "o3-mini-2025-01-31", "o3", "o3-2025-04-16", "o4-mini", "o4-mini-2025-04-16", "codex-mini-latest", "computer-use-preview"];
48
+ type OpenAIResponsesModelId = (typeof openaiResponsesModelIds)[number] | (string & {});
48
49
 
49
50
  declare class OpenAIResponsesLanguageModel implements LanguageModelV2 {
50
51
  readonly specificationVersion = "v2";
@@ -64,13 +65,16 @@ declare const openaiResponsesProviderOptionsSchema: z.ZodObject<{
64
65
  store: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
65
66
  user: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
67
  reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
67
- strictSchemas: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
68
+ strictJsonSchema: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
68
69
  instructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
70
  reasoningSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
71
  serviceTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
71
72
  auto: "auto";
72
73
  flex: "flex";
73
74
  }>>>;
75
+ include: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
76
+ "reasoning.encrypted_content": "reasoning.encrypted_content";
77
+ }>>>>;
74
78
  }, z.core.$strip>;
75
79
  type OpenAIResponsesProviderOptions = z.infer<typeof openaiResponsesProviderOptionsSchema>;
76
80