@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 +13 -0
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +317 -212
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +305 -200
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +7 -2
- package/dist/internal/index.d.ts +7 -2
- package/dist/internal/index.js +305 -200
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +299 -194
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ declare const openaiProviderOptions: z.ZodObject<{
|
|
|
22
22
|
auto: "auto";
|
|
23
23
|
flex: "flex";
|
|
24
24
|
}>>;
|
|
25
|
+
strictJsonSchema: z.ZodOptional<z.ZodBoolean>;
|
|
25
26
|
}, z.core.$strip>;
|
|
26
27
|
type OpenAIProviderOptions = z.infer<typeof openaiProviderOptions>;
|
|
27
28
|
|
|
@@ -183,7 +184,8 @@ declare class OpenAISpeechModel implements SpeechModelV2 {
|
|
|
183
184
|
doGenerate(options: Parameters<SpeechModelV2['doGenerate']>[0]): Promise<Awaited<ReturnType<SpeechModelV2['doGenerate']>>>;
|
|
184
185
|
}
|
|
185
186
|
|
|
186
|
-
|
|
187
|
+
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"];
|
|
188
|
+
type OpenAIResponsesModelId = (typeof openaiResponsesModelIds)[number] | (string & {});
|
|
187
189
|
|
|
188
190
|
declare class OpenAIResponsesLanguageModel implements LanguageModelV2 {
|
|
189
191
|
readonly specificationVersion = "v2";
|
|
@@ -203,13 +205,16 @@ declare const openaiResponsesProviderOptionsSchema: z.ZodObject<{
|
|
|
203
205
|
store: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
204
206
|
user: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
205
207
|
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
206
|
-
|
|
208
|
+
strictJsonSchema: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
207
209
|
instructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
208
210
|
reasoningSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
209
211
|
serviceTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
210
212
|
auto: "auto";
|
|
211
213
|
flex: "flex";
|
|
212
214
|
}>>>;
|
|
215
|
+
include: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
216
|
+
"reasoning.encrypted_content": "reasoning.encrypted_content";
|
|
217
|
+
}>>>>;
|
|
213
218
|
}, z.core.$strip>;
|
|
214
219
|
type OpenAIResponsesProviderOptions = z.infer<typeof openaiResponsesProviderOptionsSchema>;
|
|
215
220
|
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ declare const openaiProviderOptions: z.ZodObject<{
|
|
|
22
22
|
auto: "auto";
|
|
23
23
|
flex: "flex";
|
|
24
24
|
}>>;
|
|
25
|
+
strictJsonSchema: z.ZodOptional<z.ZodBoolean>;
|
|
25
26
|
}, z.core.$strip>;
|
|
26
27
|
type OpenAIProviderOptions = z.infer<typeof openaiProviderOptions>;
|
|
27
28
|
|
|
@@ -183,7 +184,8 @@ declare class OpenAISpeechModel implements SpeechModelV2 {
|
|
|
183
184
|
doGenerate(options: Parameters<SpeechModelV2['doGenerate']>[0]): Promise<Awaited<ReturnType<SpeechModelV2['doGenerate']>>>;
|
|
184
185
|
}
|
|
185
186
|
|
|
186
|
-
|
|
187
|
+
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"];
|
|
188
|
+
type OpenAIResponsesModelId = (typeof openaiResponsesModelIds)[number] | (string & {});
|
|
187
189
|
|
|
188
190
|
declare class OpenAIResponsesLanguageModel implements LanguageModelV2 {
|
|
189
191
|
readonly specificationVersion = "v2";
|
|
@@ -203,13 +205,16 @@ declare const openaiResponsesProviderOptionsSchema: z.ZodObject<{
|
|
|
203
205
|
store: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
204
206
|
user: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
205
207
|
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
206
|
-
|
|
208
|
+
strictJsonSchema: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
207
209
|
instructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
208
210
|
reasoningSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
209
211
|
serviceTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
210
212
|
auto: "auto";
|
|
211
213
|
flex: "flex";
|
|
212
214
|
}>>>;
|
|
215
|
+
include: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
216
|
+
"reasoning.encrypted_content": "reasoning.encrypted_content";
|
|
217
|
+
}>>>>;
|
|
213
218
|
}, z.core.$strip>;
|
|
214
219
|
type OpenAIResponsesProviderOptions = z.infer<typeof openaiResponsesProviderOptionsSchema>;
|
|
215
220
|
|