@ai-sdk/openai 3.0.0-beta.93 → 3.0.0-beta.95

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,17 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 3.0.0-beta.95
4
+
5
+ ### Patch Changes
6
+
7
+ - 40dc7fa: fix(openai): change find action type to find_in_page action type
8
+
9
+ ## 3.0.0-beta.94
10
+
11
+ ### Patch Changes
12
+
13
+ - f18ef7f: feat(openai): add gpt-5.2 models
14
+
3
15
  ## 3.0.0-beta.93
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -3,7 +3,7 @@ import { ProviderV3, LanguageModelV3, EmbeddingModelV3, ImageModelV3, Transcript
3
3
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
4
4
  import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
5
5
 
6
- 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' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | (string & {});
6
+ 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' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | (string & {});
7
7
  declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
8
8
  logitBias?: Record<number, number> | undefined;
9
9
  logprobs?: number | boolean | undefined;
@@ -32,7 +32,7 @@ type OpenAIImageModelId = 'dall-e-3' | 'dall-e-2' | 'gpt-image-1' | 'gpt-image-1
32
32
  declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
33
33
  /**
34
34
  * An object describing the specific action taken in this web search call.
35
- * Includes details on how the model used the web (search, open_page, find).
35
+ * Includes details on how the model used the web (search, open_page, find_in_page).
36
36
  */
37
37
  action: {
38
38
  /**
@@ -54,9 +54,9 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWi
54
54
  url?: string | null;
55
55
  } | {
56
56
  /**
57
- * Action type "find": Searches for a pattern within a loaded page.
57
+ * Action type "findInPage": Searches for a pattern within a loaded page.
58
58
  */
59
- type: "find";
59
+ type: "findInPage";
60
60
  /**
61
61
  * The URL of the page searched for the pattern.
62
62
  */
@@ -351,7 +351,7 @@ declare const openaiTools: {
351
351
  type: "openPage";
352
352
  url?: string | null;
353
353
  } | {
354
- type: "find";
354
+ type: "findInPage";
355
355
  url?: string | null;
356
356
  pattern?: string | null;
357
357
  };
@@ -381,7 +381,7 @@ declare const openaiTools: {
381
381
  type: "openPage";
382
382
  url?: string | null;
383
383
  } | {
384
- type: "find";
384
+ type: "findInPage";
385
385
  url?: string | null;
386
386
  pattern?: string | null;
387
387
  };
@@ -443,7 +443,7 @@ declare const openaiTools: {
443
443
  }>;
444
444
  };
445
445
 
446
- 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.1' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | '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 & {});
446
+ 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.1' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | '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 & {});
447
447
  declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
448
448
  conversation?: string | null | undefined;
449
449
  include?: ("file_search_call.results" | "message.output_text.logprobs" | "reasoning.encrypted_content")[] | null | undefined;
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { ProviderV3, LanguageModelV3, EmbeddingModelV3, ImageModelV3, Transcript
3
3
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
4
4
  import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
5
5
 
6
- 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' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | (string & {});
6
+ 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' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | (string & {});
7
7
  declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
8
8
  logitBias?: Record<number, number> | undefined;
9
9
  logprobs?: number | boolean | undefined;
@@ -32,7 +32,7 @@ type OpenAIImageModelId = 'dall-e-3' | 'dall-e-2' | 'gpt-image-1' | 'gpt-image-1
32
32
  declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
33
33
  /**
34
34
  * An object describing the specific action taken in this web search call.
35
- * Includes details on how the model used the web (search, open_page, find).
35
+ * Includes details on how the model used the web (search, open_page, find_in_page).
36
36
  */
37
37
  action: {
38
38
  /**
@@ -54,9 +54,9 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWi
54
54
  url?: string | null;
55
55
  } | {
56
56
  /**
57
- * Action type "find": Searches for a pattern within a loaded page.
57
+ * Action type "findInPage": Searches for a pattern within a loaded page.
58
58
  */
59
- type: "find";
59
+ type: "findInPage";
60
60
  /**
61
61
  * The URL of the page searched for the pattern.
62
62
  */
@@ -351,7 +351,7 @@ declare const openaiTools: {
351
351
  type: "openPage";
352
352
  url?: string | null;
353
353
  } | {
354
- type: "find";
354
+ type: "findInPage";
355
355
  url?: string | null;
356
356
  pattern?: string | null;
357
357
  };
@@ -381,7 +381,7 @@ declare const openaiTools: {
381
381
  type: "openPage";
382
382
  url?: string | null;
383
383
  } | {
384
- type: "find";
384
+ type: "findInPage";
385
385
  url?: string | null;
386
386
  pattern?: string | null;
387
387
  };
@@ -443,7 +443,7 @@ declare const openaiTools: {
443
443
  }>;
444
444
  };
445
445
 
446
- 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.1' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | '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 & {});
446
+ 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.1' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | '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 & {});
447
447
  declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
448
448
  conversation?: string | null | undefined;
449
449
  include?: ("file_search_call.results" | "message.output_text.logprobs" | "reasoning.encrypted_content")[] | null | undefined;
package/dist/index.js CHANGED
@@ -2064,7 +2064,7 @@ var webSearchOutputSchema = (0, import_provider_utils20.lazySchema)(
2064
2064
  url: import_v415.z.string().nullish()
2065
2065
  }),
2066
2066
  import_v415.z.object({
2067
- type: import_v415.z.literal("find"),
2067
+ type: import_v415.z.literal("findInPage"),
2068
2068
  url: import_v415.z.string().nullish(),
2069
2069
  pattern: import_v415.z.string().nullish()
2070
2070
  })
@@ -2118,7 +2118,7 @@ var webSearchPreviewOutputSchema = (0, import_provider_utils21.lazySchema)(
2118
2118
  url: import_v416.z.string().nullish()
2119
2119
  }),
2120
2120
  import_v416.z.object({
2121
- type: import_v416.z.literal("find"),
2121
+ type: import_v416.z.literal("findInPage"),
2122
2122
  url: import_v416.z.string().nullish(),
2123
2123
  pattern: import_v416.z.string().nullish()
2124
2124
  })
@@ -2932,7 +2932,7 @@ var openaiResponsesChunkSchema = (0, import_provider_utils24.lazySchema)(
2932
2932
  url: import_v419.z.string().nullish()
2933
2933
  }),
2934
2934
  import_v419.z.object({
2935
- type: import_v419.z.literal("find"),
2935
+ type: import_v419.z.literal("find_in_page"),
2936
2936
  url: import_v419.z.string().nullish(),
2937
2937
  pattern: import_v419.z.string().nullish()
2938
2938
  })
@@ -3236,7 +3236,7 @@ var openaiResponsesResponseSchema = (0, import_provider_utils24.lazySchema)(
3236
3236
  url: import_v419.z.string().nullish()
3237
3237
  }),
3238
3238
  import_v419.z.object({
3239
- type: import_v419.z.literal("find"),
3239
+ type: import_v419.z.literal("find_in_page"),
3240
3240
  url: import_v419.z.string().nullish(),
3241
3241
  pattern: import_v419.z.string().nullish()
3242
3242
  })
@@ -3435,7 +3435,10 @@ var openaiResponsesReasoningModelIds = [
3435
3435
  "gpt-5.1-chat-latest",
3436
3436
  "gpt-5.1-codex-mini",
3437
3437
  "gpt-5.1-codex",
3438
- "gpt-5.1-codex-max"
3438
+ "gpt-5.1-codex-max",
3439
+ "gpt-5.2",
3440
+ "gpt-5.2-chat-latest",
3441
+ "gpt-5.2-pro"
3439
3442
  ];
3440
3443
  var openaiResponsesModelIds = [
3441
3444
  "gpt-4.1",
@@ -5122,9 +5125,13 @@ function mapWebSearchOutput(action) {
5122
5125
  };
5123
5126
  case "open_page":
5124
5127
  return { action: { type: "openPage", url: action.url } };
5125
- case "find":
5128
+ case "find_in_page":
5126
5129
  return {
5127
- action: { type: "find", url: action.url, pattern: action.pattern }
5130
+ action: {
5131
+ type: "findInPage",
5132
+ url: action.url,
5133
+ pattern: action.pattern
5134
+ }
5128
5135
  };
5129
5136
  }
5130
5137
  }
@@ -5482,7 +5489,7 @@ var OpenAITranscriptionModel = class {
5482
5489
  };
5483
5490
 
5484
5491
  // src/version.ts
5485
- var VERSION = true ? "3.0.0-beta.93" : "0.0.0-test";
5492
+ var VERSION = true ? "3.0.0-beta.95" : "0.0.0-test";
5486
5493
 
5487
5494
  // src/openai-provider.ts
5488
5495
  function createOpenAI(options = {}) {