@ai-sdk/openai 2.0.83 → 2.0.85

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
+ ## 2.0.85
4
+
5
+ ### Patch Changes
6
+
7
+ - e79430b: fix(openai): change find action type to find_in_page action type
8
+
9
+ ## 2.0.84
10
+
11
+ ### Patch Changes
12
+
13
+ - 041a4fc: feat(openai): add gpt-5.2 models
14
+
3
15
  ## 2.0.83
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -2,7 +2,7 @@ import { ProviderV2, LanguageModelV2, EmbeddingModelV2, ImageModelV2, Transcript
2
2
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
3
3
  import { InferValidator, FetchFunction } from '@ai-sdk/provider-utils';
4
4
 
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' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | (string & {});
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' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | (string & {});
6
6
  declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazyValidator<{
7
7
  logitBias?: Record<number, number> | undefined;
8
8
  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.ProviderDefinedToolFactoryWithOutputSchema<{}, {
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, findInPage).
36
36
  */
37
37
  action: {
38
38
  /**
@@ -54,9 +54,9 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderDefinedToolFa
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
  */
@@ -283,7 +283,7 @@ declare const openaiTools: {
283
283
  type: "openPage";
284
284
  url?: string | null;
285
285
  } | {
286
- type: "find";
286
+ type: "findInPage";
287
287
  url?: string | null;
288
288
  pattern?: string | null;
289
289
  };
@@ -315,7 +315,7 @@ declare const openaiTools: {
315
315
  type: "openPage";
316
316
  url?: string | null;
317
317
  } | {
318
- type: "find";
318
+ type: "findInPage";
319
319
  url?: string | null;
320
320
  pattern?: string | null;
321
321
  };
@@ -329,7 +329,7 @@ declare const openaiTools: {
329
329
  }>;
330
330
  };
331
331
 
332
- 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 & {});
332
+ 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 & {});
333
333
  declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazyValidator<{
334
334
  conversation?: string | null | undefined;
335
335
  include?: ("file_search_call.results" | "message.output_text.logprobs" | "reasoning.encrypted_content")[] | null | undefined;
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { ProviderV2, LanguageModelV2, EmbeddingModelV2, ImageModelV2, Transcript
2
2
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
3
3
  import { InferValidator, FetchFunction } from '@ai-sdk/provider-utils';
4
4
 
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' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | (string & {});
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' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | (string & {});
6
6
  declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazyValidator<{
7
7
  logitBias?: Record<number, number> | undefined;
8
8
  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.ProviderDefinedToolFactoryWithOutputSchema<{}, {
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, findInPage).
36
36
  */
37
37
  action: {
38
38
  /**
@@ -54,9 +54,9 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderDefinedToolFa
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
  */
@@ -283,7 +283,7 @@ declare const openaiTools: {
283
283
  type: "openPage";
284
284
  url?: string | null;
285
285
  } | {
286
- type: "find";
286
+ type: "findInPage";
287
287
  url?: string | null;
288
288
  pattern?: string | null;
289
289
  };
@@ -315,7 +315,7 @@ declare const openaiTools: {
315
315
  type: "openPage";
316
316
  url?: string | null;
317
317
  } | {
318
- type: "find";
318
+ type: "findInPage";
319
319
  url?: string | null;
320
320
  pattern?: string | null;
321
321
  };
@@ -329,7 +329,7 @@ declare const openaiTools: {
329
329
  }>;
330
330
  };
331
331
 
332
- 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 & {});
332
+ 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 & {});
333
333
  declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazyValidator<{
334
334
  conversation?: string | null | undefined;
335
335
  include?: ("file_search_call.results" | "message.output_text.logprobs" | "reasoning.encrypted_content")[] | null | undefined;
package/dist/index.js CHANGED
@@ -1944,7 +1944,7 @@ var webSearchOutputSchema = (0, import_provider_utils18.lazySchema)(
1944
1944
  url: import_v413.z.string().nullish()
1945
1945
  }),
1946
1946
  import_v413.z.object({
1947
- type: import_v413.z.literal("find"),
1947
+ type: import_v413.z.literal("findInPage"),
1948
1948
  url: import_v413.z.string().nullish(),
1949
1949
  pattern: import_v413.z.string().nullish()
1950
1950
  })
@@ -1999,7 +1999,7 @@ var webSearchPreviewOutputSchema = (0, import_provider_utils19.lazySchema)(
1999
1999
  url: import_v414.z.string().nullish()
2000
2000
  }),
2001
2001
  import_v414.z.object({
2002
- type: import_v414.z.literal("find"),
2002
+ type: import_v414.z.literal("findInPage"),
2003
2003
  url: import_v414.z.string().nullish(),
2004
2004
  pattern: import_v414.z.string().nullish()
2005
2005
  })
@@ -2548,7 +2548,7 @@ var openaiResponsesChunkSchema = (0, import_provider_utils21.lazyValidator)(
2548
2548
  url: import_v416.z.string().nullish()
2549
2549
  }),
2550
2550
  import_v416.z.object({
2551
- type: import_v416.z.literal("find"),
2551
+ type: import_v416.z.literal("find_in_page"),
2552
2552
  url: import_v416.z.string().nullish(),
2553
2553
  pattern: import_v416.z.string().nullish()
2554
2554
  })
@@ -2758,7 +2758,7 @@ var openaiResponsesResponseSchema = (0, import_provider_utils21.lazyValidator)(
2758
2758
  url: import_v416.z.string().nullish()
2759
2759
  }),
2760
2760
  import_v416.z.object({
2761
- type: import_v416.z.literal("find"),
2761
+ type: import_v416.z.literal("find_in_page"),
2762
2762
  url: import_v416.z.string().nullish(),
2763
2763
  pattern: import_v416.z.string().nullish()
2764
2764
  })
@@ -2880,7 +2880,10 @@ var openaiResponsesReasoningModelIds = [
2880
2880
  "gpt-5.1-chat-latest",
2881
2881
  "gpt-5.1-codex-mini",
2882
2882
  "gpt-5.1-codex",
2883
- "gpt-5.1-codex-max"
2883
+ "gpt-5.1-codex-max",
2884
+ "gpt-5.2",
2885
+ "gpt-5.2-chat-latest",
2886
+ "gpt-5.2-pro"
2884
2887
  ];
2885
2888
  var openaiResponsesModelIds = [
2886
2889
  "gpt-4.1",
@@ -4192,9 +4195,13 @@ function mapWebSearchOutput(action) {
4192
4195
  };
4193
4196
  case "open_page":
4194
4197
  return { action: { type: "openPage", url: action.url } };
4195
- case "find":
4198
+ case "find_in_page":
4196
4199
  return {
4197
- action: { type: "find", url: action.url, pattern: action.pattern }
4200
+ action: {
4201
+ type: "findInPage",
4202
+ url: action.url,
4203
+ pattern: action.pattern
4204
+ }
4198
4205
  };
4199
4206
  }
4200
4207
  }
@@ -4552,7 +4559,7 @@ var OpenAITranscriptionModel = class {
4552
4559
  };
4553
4560
 
4554
4561
  // src/version.ts
4555
- var VERSION = true ? "2.0.83" : "0.0.0-test";
4562
+ var VERSION = true ? "2.0.85" : "0.0.0-test";
4556
4563
 
4557
4564
  // src/openai-provider.ts
4558
4565
  function createOpenAI(options = {}) {