@ai-sdk/openai 2.0.0-beta.1 → 2.0.0-beta.3
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 +16 -0
- package/dist/index.d.mts +7 -26
- package/dist/index.d.ts +7 -26
- package/dist/index.js +347 -341
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -39
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +30 -204
- package/dist/internal/index.d.ts +30 -204
- package/dist/internal/index.js +347 -341
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +45 -39
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.3
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- efc3a62: fix (provider/openai): default strict mode to false
|
|
8
|
+
|
|
9
|
+
## 2.0.0-beta.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- d1a034f: feature: using Zod 4 for internal stuff
|
|
14
|
+
- Updated dependencies [0571b98]
|
|
15
|
+
- Updated dependencies [39a4fab]
|
|
16
|
+
- Updated dependencies [d1a034f]
|
|
17
|
+
- @ai-sdk/provider-utils@3.0.0-beta.2
|
|
18
|
+
|
|
3
19
|
## 2.0.0-beta.1
|
|
4
20
|
|
|
5
21
|
### Major Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LanguageModelV2, ProviderV2, EmbeddingModelV2, ImageModelV2, TranscriptionModelV2, SpeechModelV2 } from '@ai-sdk/provider';
|
|
2
2
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
3
3
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
4
|
-
import { z } from 'zod';
|
|
4
|
+
import { z } from 'zod/v4';
|
|
5
5
|
|
|
6
6
|
type OpenAIChatModelId = '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 & {});
|
|
7
7
|
|
|
@@ -64,33 +64,14 @@ declare const openaiResponsesProviderOptionsSchema: z.ZodObject<{
|
|
|
64
64
|
store: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
65
65
|
user: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
66
66
|
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
-
|
|
67
|
+
strictJsonSchema: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
68
68
|
instructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
69
|
reasoningSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
|
-
serviceTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
store?: boolean | null | undefined;
|
|
76
|
-
metadata?: any;
|
|
77
|
-
serviceTier?: "auto" | "flex" | null | undefined;
|
|
78
|
-
previousResponseId?: string | null | undefined;
|
|
79
|
-
strictSchemas?: boolean | null | undefined;
|
|
80
|
-
instructions?: string | null | undefined;
|
|
81
|
-
reasoningSummary?: string | null | undefined;
|
|
82
|
-
}, {
|
|
83
|
-
user?: string | null | undefined;
|
|
84
|
-
parallelToolCalls?: boolean | null | undefined;
|
|
85
|
-
reasoningEffort?: string | null | undefined;
|
|
86
|
-
store?: boolean | null | undefined;
|
|
87
|
-
metadata?: any;
|
|
88
|
-
serviceTier?: "auto" | "flex" | null | undefined;
|
|
89
|
-
previousResponseId?: string | null | undefined;
|
|
90
|
-
strictSchemas?: boolean | null | undefined;
|
|
91
|
-
instructions?: string | null | undefined;
|
|
92
|
-
reasoningSummary?: string | null | undefined;
|
|
93
|
-
}>;
|
|
70
|
+
serviceTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
71
|
+
auto: "auto";
|
|
72
|
+
flex: "flex";
|
|
73
|
+
}>>>;
|
|
74
|
+
}, z.core.$strip>;
|
|
94
75
|
type OpenAIResponsesProviderOptions = z.infer<typeof openaiResponsesProviderOptionsSchema>;
|
|
95
76
|
|
|
96
77
|
type OpenAISpeechModelId = 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts' | (string & {});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LanguageModelV2, ProviderV2, EmbeddingModelV2, ImageModelV2, TranscriptionModelV2, SpeechModelV2 } from '@ai-sdk/provider';
|
|
2
2
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
3
3
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
4
|
-
import { z } from 'zod';
|
|
4
|
+
import { z } from 'zod/v4';
|
|
5
5
|
|
|
6
6
|
type OpenAIChatModelId = '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 & {});
|
|
7
7
|
|
|
@@ -64,33 +64,14 @@ declare const openaiResponsesProviderOptionsSchema: z.ZodObject<{
|
|
|
64
64
|
store: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
65
65
|
user: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
66
66
|
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
-
|
|
67
|
+
strictJsonSchema: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
68
68
|
instructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
69
|
reasoningSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
|
-
serviceTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
store?: boolean | null | undefined;
|
|
76
|
-
metadata?: any;
|
|
77
|
-
serviceTier?: "auto" | "flex" | null | undefined;
|
|
78
|
-
previousResponseId?: string | null | undefined;
|
|
79
|
-
strictSchemas?: boolean | null | undefined;
|
|
80
|
-
instructions?: string | null | undefined;
|
|
81
|
-
reasoningSummary?: string | null | undefined;
|
|
82
|
-
}, {
|
|
83
|
-
user?: string | null | undefined;
|
|
84
|
-
parallelToolCalls?: boolean | null | undefined;
|
|
85
|
-
reasoningEffort?: string | null | undefined;
|
|
86
|
-
store?: boolean | null | undefined;
|
|
87
|
-
metadata?: any;
|
|
88
|
-
serviceTier?: "auto" | "flex" | null | undefined;
|
|
89
|
-
previousResponseId?: string | null | undefined;
|
|
90
|
-
strictSchemas?: boolean | null | undefined;
|
|
91
|
-
instructions?: string | null | undefined;
|
|
92
|
-
reasoningSummary?: string | null | undefined;
|
|
93
|
-
}>;
|
|
70
|
+
serviceTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
71
|
+
auto: "auto";
|
|
72
|
+
flex: "flex";
|
|
73
|
+
}>>>;
|
|
74
|
+
}, z.core.$strip>;
|
|
94
75
|
type OpenAIResponsesProviderOptions = z.infer<typeof openaiResponsesProviderOptionsSchema>;
|
|
95
76
|
|
|
96
77
|
type OpenAISpeechModelId = 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts' | (string & {});
|