@ai-sdk/openai 2.0.84 → 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,11 @@
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
+
3
9
  ## 2.0.84
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -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
  };
package/dist/index.d.ts CHANGED
@@ -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
  };
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
  })
@@ -4195,9 +4195,13 @@ function mapWebSearchOutput(action) {
4195
4195
  };
4196
4196
  case "open_page":
4197
4197
  return { action: { type: "openPage", url: action.url } };
4198
- case "find":
4198
+ case "find_in_page":
4199
4199
  return {
4200
- action: { type: "find", url: action.url, pattern: action.pattern }
4200
+ action: {
4201
+ type: "findInPage",
4202
+ url: action.url,
4203
+ pattern: action.pattern
4204
+ }
4201
4205
  };
4202
4206
  }
4203
4207
  }
@@ -4555,7 +4559,7 @@ var OpenAITranscriptionModel = class {
4555
4559
  };
4556
4560
 
4557
4561
  // src/version.ts
4558
- var VERSION = true ? "2.0.84" : "0.0.0-test";
4562
+ var VERSION = true ? "2.0.85" : "0.0.0-test";
4559
4563
 
4560
4564
  // src/openai-provider.ts
4561
4565
  function createOpenAI(options = {}) {