@ai-sdk/openai 2.0.84 → 2.0.86

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.
@@ -491,7 +491,7 @@ declare const webSearchPreviewInputSchema: _ai_sdk_provider_utils.LazySchema<Rec
491
491
  declare const webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{}, {
492
492
  /**
493
493
  * An object describing the specific action taken in this web search call.
494
- * Includes details on how the model used the web (search, open_page, find).
494
+ * Includes details on how the model used the web (search, open_page, findInPage).
495
495
  */
496
496
  action: {
497
497
  /**
@@ -513,9 +513,9 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactor
513
513
  url?: string | null;
514
514
  } | {
515
515
  /**
516
- * Action type "find": Searches for a pattern within a loaded page.
516
+ * Action type "findInPage": Searches for a pattern within a loaded page.
517
517
  */
518
- type: "find";
518
+ type: "findInPage";
519
519
  /**
520
520
  * The URL of the page searched for the pattern.
521
521
  */
@@ -491,7 +491,7 @@ declare const webSearchPreviewInputSchema: _ai_sdk_provider_utils.LazySchema<Rec
491
491
  declare const webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{}, {
492
492
  /**
493
493
  * An object describing the specific action taken in this web search call.
494
- * Includes details on how the model used the web (search, open_page, find).
494
+ * Includes details on how the model used the web (search, open_page, findInPage).
495
495
  */
496
496
  action: {
497
497
  /**
@@ -513,9 +513,9 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactor
513
513
  url?: string | null;
514
514
  } | {
515
515
  /**
516
- * Action type "find": Searches for a pattern within a loaded page.
516
+ * Action type "findInPage": Searches for a pattern within a loaded page.
517
517
  */
518
- type: "find";
518
+ type: "findInPage";
519
519
  /**
520
520
  * The URL of the page searched for the pattern.
521
521
  */
@@ -325,10 +325,12 @@ var openaiChatResponseSchema = (0, import_provider_utils3.lazyValidator)(
325
325
  annotations: import_v42.z.array(
326
326
  import_v42.z.object({
327
327
  type: import_v42.z.literal("url_citation"),
328
- start_index: import_v42.z.number(),
329
- end_index: import_v42.z.number(),
330
- url: import_v42.z.string(),
331
- title: import_v42.z.string()
328
+ url_citation: import_v42.z.object({
329
+ start_index: import_v42.z.number(),
330
+ end_index: import_v42.z.number(),
331
+ url: import_v42.z.string(),
332
+ title: import_v42.z.string()
333
+ })
332
334
  })
333
335
  ).nullish()
334
336
  }),
@@ -392,10 +394,12 @@ var openaiChatChunkSchema = (0, import_provider_utils3.lazyValidator)(
392
394
  annotations: import_v42.z.array(
393
395
  import_v42.z.object({
394
396
  type: import_v42.z.literal("url_citation"),
395
- start_index: import_v42.z.number(),
396
- end_index: import_v42.z.number(),
397
- url: import_v42.z.string(),
398
- title: import_v42.z.string()
397
+ url_citation: import_v42.z.object({
398
+ start_index: import_v42.z.number(),
399
+ end_index: import_v42.z.number(),
400
+ url: import_v42.z.string(),
401
+ title: import_v42.z.string()
402
+ })
399
403
  })
400
404
  ).nullish()
401
405
  }).nullish(),
@@ -849,8 +853,8 @@ var OpenAIChatLanguageModel = class {
849
853
  type: "source",
850
854
  sourceType: "url",
851
855
  id: (0, import_provider_utils5.generateId)(),
852
- url: annotation.url,
853
- title: annotation.title
856
+ url: annotation.url_citation.url,
857
+ title: annotation.url_citation.title
854
858
  });
855
859
  }
856
860
  const completionTokenDetails = (_d = response.usage) == null ? void 0 : _d.completion_tokens_details;
@@ -1079,8 +1083,8 @@ var OpenAIChatLanguageModel = class {
1079
1083
  type: "source",
1080
1084
  sourceType: "url",
1081
1085
  id: (0, import_provider_utils5.generateId)(),
1082
- url: annotation.url,
1083
- title: annotation.title
1086
+ url: annotation.url_citation.url,
1087
+ title: annotation.url_citation.title
1084
1088
  });
1085
1089
  }
1086
1090
  }
@@ -2617,7 +2621,7 @@ var openaiResponsesChunkSchema = (0, import_provider_utils21.lazyValidator)(
2617
2621
  url: import_v414.z.string().nullish()
2618
2622
  }),
2619
2623
  import_v414.z.object({
2620
- type: import_v414.z.literal("find"),
2624
+ type: import_v414.z.literal("find_in_page"),
2621
2625
  url: import_v414.z.string().nullish(),
2622
2626
  pattern: import_v414.z.string().nullish()
2623
2627
  })
@@ -2827,7 +2831,7 @@ var openaiResponsesResponseSchema = (0, import_provider_utils21.lazyValidator)(
2827
2831
  url: import_v414.z.string().nullish()
2828
2832
  }),
2829
2833
  import_v414.z.object({
2830
- type: import_v414.z.literal("find"),
2834
+ type: import_v414.z.literal("find_in_page"),
2831
2835
  url: import_v414.z.string().nullish(),
2832
2836
  pattern: import_v414.z.string().nullish()
2833
2837
  })
@@ -3189,7 +3193,7 @@ var webSearchOutputSchema = (0, import_provider_utils25.lazySchema)(
3189
3193
  url: import_v418.z.string().nullish()
3190
3194
  }),
3191
3195
  import_v418.z.object({
3192
- type: import_v418.z.literal("find"),
3196
+ type: import_v418.z.literal("findInPage"),
3193
3197
  url: import_v418.z.string().nullish(),
3194
3198
  pattern: import_v418.z.string().nullish()
3195
3199
  })
@@ -3243,7 +3247,7 @@ var webSearchPreviewOutputSchema = (0, import_provider_utils26.lazySchema)(
3243
3247
  url: import_v419.z.string().nullish()
3244
3248
  }),
3245
3249
  import_v419.z.object({
3246
- type: import_v419.z.literal("find"),
3250
+ type: import_v419.z.literal("findInPage"),
3247
3251
  url: import_v419.z.string().nullish(),
3248
3252
  pattern: import_v419.z.string().nullish()
3249
3253
  })
@@ -4499,9 +4503,13 @@ function mapWebSearchOutput(action) {
4499
4503
  };
4500
4504
  case "open_page":
4501
4505
  return { action: { type: "openPage", url: action.url } };
4502
- case "find":
4506
+ case "find_in_page":
4503
4507
  return {
4504
- action: { type: "find", url: action.url, pattern: action.pattern }
4508
+ action: {
4509
+ type: "findInPage",
4510
+ url: action.url,
4511
+ pattern: action.pattern
4512
+ }
4505
4513
  };
4506
4514
  }
4507
4515
  }