@ai-sdk/openai 3.0.0-beta.24 → 3.0.0-beta.25

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,12 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 3.0.0-beta.25
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [6306603]
8
+ - @ai-sdk/provider-utils@4.0.0-beta.16
9
+
3
10
  ## 3.0.0-beta.24
4
11
 
5
12
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { ProviderV3, LanguageModelV3, EmbeddingModelV3, ImageModelV3, TranscriptionModelV3, SpeechModelV3 } from '@ai-sdk/provider';
2
2
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
3
- import { InferValidator, FetchFunction } from '@ai-sdk/provider-utils';
3
+ import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
4
4
 
5
5
  type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-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-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | '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' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | (string & {});
6
- declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazyValidator<{
6
+ declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
7
7
  logitBias?: Record<number, number> | undefined;
8
8
  logprobs?: number | boolean | undefined;
9
9
  parallelToolCalls?: boolean | undefined;
@@ -20,7 +20,7 @@ declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazyValidat
20
20
  promptCacheKey?: string | undefined;
21
21
  safetyIdentifier?: string | undefined;
22
22
  }>;
23
- type OpenAIChatLanguageModelOptions = InferValidator<typeof openaiChatLanguageModelOptions>;
23
+ type OpenAIChatLanguageModelOptions = InferSchema<typeof openaiChatLanguageModelOptions>;
24
24
 
25
25
  type OpenAICompletionModelId = 'gpt-3.5-turbo-instruct' | (string & {});
26
26
 
@@ -251,7 +251,7 @@ declare const openaiTools: {
251
251
  };
252
252
 
253
253
  type OpenAIResponsesModelId = 'chatgpt-4o-latest' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo' | 'gpt-4-0613' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1' | 'gpt-4' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-5-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5-codex' | 'gpt-5-mini-2025-08-07' | 'gpt-5-mini' | 'gpt-5-nano-2025-08-07' | 'gpt-5-nano' | 'gpt-5-pro-2025-10-06' | 'gpt-5-pro' | 'gpt-5' | 'o1-2024-12-17' | 'o1' | 'o3-2025-04-16' | 'o3-mini-2025-01-31' | 'o3-mini' | 'o3' | (string & {});
254
- declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazyValidator<{
254
+ declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
255
255
  include?: ("file_search_call.results" | "message.output_text.logprobs" | "reasoning.encrypted_content")[] | null | undefined;
256
256
  instructions?: string | null | undefined;
257
257
  logprobs?: number | boolean | undefined;
@@ -269,7 +269,7 @@ declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazyV
269
269
  textVerbosity?: "low" | "medium" | "high" | null | undefined;
270
270
  user?: string | null | undefined;
271
271
  }>;
272
- type OpenAIResponsesProviderOptions = InferValidator<typeof openaiResponsesProviderOptionsSchema>;
272
+ type OpenAIResponsesProviderOptions = InferSchema<typeof openaiResponsesProviderOptionsSchema>;
273
273
 
274
274
  type OpenAISpeechModelId = 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts' | (string & {});
275
275
 
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { ProviderV3, LanguageModelV3, EmbeddingModelV3, ImageModelV3, TranscriptionModelV3, SpeechModelV3 } from '@ai-sdk/provider';
2
2
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
3
- import { InferValidator, FetchFunction } from '@ai-sdk/provider-utils';
3
+ import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
4
4
 
5
5
  type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-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-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | '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' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | (string & {});
6
- declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazyValidator<{
6
+ declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
7
7
  logitBias?: Record<number, number> | undefined;
8
8
  logprobs?: number | boolean | undefined;
9
9
  parallelToolCalls?: boolean | undefined;
@@ -20,7 +20,7 @@ declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazyValidat
20
20
  promptCacheKey?: string | undefined;
21
21
  safetyIdentifier?: string | undefined;
22
22
  }>;
23
- type OpenAIChatLanguageModelOptions = InferValidator<typeof openaiChatLanguageModelOptions>;
23
+ type OpenAIChatLanguageModelOptions = InferSchema<typeof openaiChatLanguageModelOptions>;
24
24
 
25
25
  type OpenAICompletionModelId = 'gpt-3.5-turbo-instruct' | (string & {});
26
26
 
@@ -251,7 +251,7 @@ declare const openaiTools: {
251
251
  };
252
252
 
253
253
  type OpenAIResponsesModelId = 'chatgpt-4o-latest' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo' | 'gpt-4-0613' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1' | 'gpt-4' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-5-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5-codex' | 'gpt-5-mini-2025-08-07' | 'gpt-5-mini' | 'gpt-5-nano-2025-08-07' | 'gpt-5-nano' | 'gpt-5-pro-2025-10-06' | 'gpt-5-pro' | 'gpt-5' | 'o1-2024-12-17' | 'o1' | 'o3-2025-04-16' | 'o3-mini-2025-01-31' | 'o3-mini' | 'o3' | (string & {});
254
- declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazyValidator<{
254
+ declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
255
255
  include?: ("file_search_call.results" | "message.output_text.logprobs" | "reasoning.encrypted_content")[] | null | undefined;
256
256
  instructions?: string | null | undefined;
257
257
  logprobs?: number | boolean | undefined;
@@ -269,7 +269,7 @@ declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazyV
269
269
  textVerbosity?: "low" | "medium" | "high" | null | undefined;
270
270
  user?: string | null | undefined;
271
271
  }>;
272
- type OpenAIResponsesProviderOptions = InferValidator<typeof openaiResponsesProviderOptionsSchema>;
272
+ type OpenAIResponsesProviderOptions = InferSchema<typeof openaiResponsesProviderOptionsSchema>;
273
273
 
274
274
  type OpenAISpeechModelId = 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts' | (string & {});
275
275
 
package/dist/index.js CHANGED
@@ -267,7 +267,7 @@ function mapOpenAIFinishReason(finishReason) {
267
267
  // src/chat/openai-chat-api.ts
268
268
  var import_provider_utils3 = require("@ai-sdk/provider-utils");
269
269
  var import_v42 = require("zod/v4");
270
- var openaiChatResponseSchema = (0, import_provider_utils3.lazyValidator)(
270
+ var openaiChatResponseSchema = (0, import_provider_utils3.lazySchema)(
271
271
  () => (0, import_provider_utils3.zodSchema)(
272
272
  import_v42.z.object({
273
273
  id: import_v42.z.string().nullish(),
@@ -332,7 +332,7 @@ var openaiChatResponseSchema = (0, import_provider_utils3.lazyValidator)(
332
332
  })
333
333
  )
334
334
  );
335
- var openaiChatChunkSchema = (0, import_provider_utils3.lazyValidator)(
335
+ var openaiChatChunkSchema = (0, import_provider_utils3.lazySchema)(
336
336
  () => (0, import_provider_utils3.zodSchema)(
337
337
  import_v42.z.union([
338
338
  import_v42.z.object({
@@ -405,7 +405,7 @@ var openaiChatChunkSchema = (0, import_provider_utils3.lazyValidator)(
405
405
  // src/chat/openai-chat-options.ts
406
406
  var import_provider_utils4 = require("@ai-sdk/provider-utils");
407
407
  var import_v43 = require("zod/v4");
408
- var openaiChatLanguageModelOptions = (0, import_provider_utils4.lazyValidator)(
408
+ var openaiChatLanguageModelOptions = (0, import_provider_utils4.lazySchema)(
409
409
  () => (0, import_provider_utils4.zodSchema)(
410
410
  import_v43.z.object({
411
411
  /**
@@ -1213,7 +1213,7 @@ function mapOpenAIFinishReason2(finishReason) {
1213
1213
  // src/completion/openai-completion-api.ts
1214
1214
  var import_v44 = require("zod/v4");
1215
1215
  var import_provider_utils6 = require("@ai-sdk/provider-utils");
1216
- var openaiCompletionResponseSchema = (0, import_provider_utils6.lazyValidator)(
1216
+ var openaiCompletionResponseSchema = (0, import_provider_utils6.lazySchema)(
1217
1217
  () => (0, import_provider_utils6.zodSchema)(
1218
1218
  import_v44.z.object({
1219
1219
  id: import_v44.z.string().nullish(),
@@ -1238,7 +1238,7 @@ var openaiCompletionResponseSchema = (0, import_provider_utils6.lazyValidator)(
1238
1238
  })
1239
1239
  )
1240
1240
  );
1241
- var openaiCompletionChunkSchema = (0, import_provider_utils6.lazyValidator)(
1241
+ var openaiCompletionChunkSchema = (0, import_provider_utils6.lazySchema)(
1242
1242
  () => (0, import_provider_utils6.zodSchema)(
1243
1243
  import_v44.z.union([
1244
1244
  import_v44.z.object({
@@ -1271,7 +1271,7 @@ var openaiCompletionChunkSchema = (0, import_provider_utils6.lazyValidator)(
1271
1271
  // src/completion/openai-completion-options.ts
1272
1272
  var import_provider_utils7 = require("@ai-sdk/provider-utils");
1273
1273
  var import_v45 = require("zod/v4");
1274
- var openaiCompletionProviderOptions = (0, import_provider_utils7.lazyValidator)(
1274
+ var openaiCompletionProviderOptions = (0, import_provider_utils7.lazySchema)(
1275
1275
  () => (0, import_provider_utils7.zodSchema)(
1276
1276
  import_v45.z.object({
1277
1277
  /**
@@ -1553,7 +1553,7 @@ var import_provider_utils11 = require("@ai-sdk/provider-utils");
1553
1553
  // src/embedding/openai-embedding-options.ts
1554
1554
  var import_provider_utils9 = require("@ai-sdk/provider-utils");
1555
1555
  var import_v46 = require("zod/v4");
1556
- var openaiEmbeddingProviderOptions = (0, import_provider_utils9.lazyValidator)(
1556
+ var openaiEmbeddingProviderOptions = (0, import_provider_utils9.lazySchema)(
1557
1557
  () => (0, import_provider_utils9.zodSchema)(
1558
1558
  import_v46.z.object({
1559
1559
  /**
@@ -1573,7 +1573,7 @@ var openaiEmbeddingProviderOptions = (0, import_provider_utils9.lazyValidator)(
1573
1573
  // src/embedding/openai-embedding-api.ts
1574
1574
  var import_provider_utils10 = require("@ai-sdk/provider-utils");
1575
1575
  var import_v47 = require("zod/v4");
1576
- var openaiTextEmbeddingResponseSchema = (0, import_provider_utils10.lazyValidator)(
1576
+ var openaiTextEmbeddingResponseSchema = (0, import_provider_utils10.lazySchema)(
1577
1577
  () => (0, import_provider_utils10.zodSchema)(
1578
1578
  import_v47.z.object({
1579
1579
  data: import_v47.z.array(import_v47.z.object({ embedding: import_v47.z.array(import_v47.z.number()) })),
@@ -1652,7 +1652,7 @@ var import_provider_utils13 = require("@ai-sdk/provider-utils");
1652
1652
  // src/image/openai-image-api.ts
1653
1653
  var import_provider_utils12 = require("@ai-sdk/provider-utils");
1654
1654
  var import_v48 = require("zod/v4");
1655
- var openaiImageResponseSchema = (0, import_provider_utils12.lazyValidator)(
1655
+ var openaiImageResponseSchema = (0, import_provider_utils12.lazySchema)(
1656
1656
  () => (0, import_provider_utils12.zodSchema)(
1657
1657
  import_v48.z.object({
1658
1658
  data: import_v48.z.array(
@@ -2408,7 +2408,7 @@ function mapOpenAIResponseFinishReason({
2408
2408
  // src/responses/openai-responses-api.ts
2409
2409
  var import_provider_utils21 = require("@ai-sdk/provider-utils");
2410
2410
  var import_v416 = require("zod/v4");
2411
- var openaiResponsesChunkSchema = (0, import_provider_utils21.lazyValidator)(
2411
+ var openaiResponsesChunkSchema = (0, import_provider_utils21.lazySchema)(
2412
2412
  () => (0, import_provider_utils21.zodSchema)(
2413
2413
  import_v416.z.union([
2414
2414
  import_v416.z.object({
@@ -2668,7 +2668,7 @@ var openaiResponsesChunkSchema = (0, import_provider_utils21.lazyValidator)(
2668
2668
  ])
2669
2669
  )
2670
2670
  );
2671
- var openaiResponsesResponseSchema = (0, import_provider_utils21.lazyValidator)(
2671
+ var openaiResponsesResponseSchema = (0, import_provider_utils21.lazySchema)(
2672
2672
  () => (0, import_provider_utils21.zodSchema)(
2673
2673
  import_v416.z.object({
2674
2674
  id: import_v416.z.string(),
@@ -2888,7 +2888,7 @@ var openaiResponsesModelIds = [
2888
2888
  "gpt-5-chat-latest",
2889
2889
  ...openaiResponsesReasoningModelIds
2890
2890
  ];
2891
- var openaiResponsesProviderOptionsSchema = (0, import_provider_utils22.lazyValidator)(
2891
+ var openaiResponsesProviderOptionsSchema = (0, import_provider_utils22.lazySchema)(
2892
2892
  () => (0, import_provider_utils22.zodSchema)(
2893
2893
  import_v417.z.object({
2894
2894
  include: import_v417.z.array(
@@ -4085,7 +4085,7 @@ var import_provider_utils26 = require("@ai-sdk/provider-utils");
4085
4085
  // src/speech/openai-speech-options.ts
4086
4086
  var import_provider_utils25 = require("@ai-sdk/provider-utils");
4087
4087
  var import_v418 = require("zod/v4");
4088
- var openaiSpeechProviderOptionsSchema = (0, import_provider_utils25.lazyValidator)(
4088
+ var openaiSpeechProviderOptionsSchema = (0, import_provider_utils25.lazySchema)(
4089
4089
  () => (0, import_provider_utils25.zodSchema)(
4090
4090
  import_v418.z.object({
4091
4091
  instructions: import_v418.z.string().nullish(),
@@ -4201,7 +4201,7 @@ var import_provider_utils29 = require("@ai-sdk/provider-utils");
4201
4201
  // src/transcription/openai-transcription-api.ts
4202
4202
  var import_provider_utils27 = require("@ai-sdk/provider-utils");
4203
4203
  var import_v419 = require("zod/v4");
4204
- var openaiTranscriptionResponseSchema = (0, import_provider_utils27.lazyValidator)(
4204
+ var openaiTranscriptionResponseSchema = (0, import_provider_utils27.lazySchema)(
4205
4205
  () => (0, import_provider_utils27.zodSchema)(
4206
4206
  import_v419.z.object({
4207
4207
  text: import_v419.z.string(),
@@ -4235,7 +4235,7 @@ var openaiTranscriptionResponseSchema = (0, import_provider_utils27.lazyValidato
4235
4235
  // src/transcription/openai-transcription-options.ts
4236
4236
  var import_provider_utils28 = require("@ai-sdk/provider-utils");
4237
4237
  var import_v420 = require("zod/v4");
4238
- var openAITranscriptionProviderOptions = (0, import_provider_utils28.lazyValidator)(
4238
+ var openAITranscriptionProviderOptions = (0, import_provider_utils28.lazySchema)(
4239
4239
  () => (0, import_provider_utils28.zodSchema)(
4240
4240
  import_v420.z.object({
4241
4241
  /**
@@ -4432,7 +4432,7 @@ var OpenAITranscriptionModel = class {
4432
4432
  };
4433
4433
 
4434
4434
  // src/version.ts
4435
- var VERSION = true ? "3.0.0-beta.24" : "0.0.0-test";
4435
+ var VERSION = true ? "3.0.0-beta.25" : "0.0.0-test";
4436
4436
 
4437
4437
  // src/openai-provider.ts
4438
4438
  function createOpenAI(options = {}) {