@ai-sdk/openai 3.0.0-beta.94 → 3.0.0-beta.96

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.
@@ -619,7 +619,7 @@ declare const webSearchPreviewInputSchema: _ai_sdk_provider_utils.LazySchema<Rec
619
619
  declare const webSearchPreview: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
620
620
  /**
621
621
  * An object describing the specific action taken in this web search call.
622
- * Includes details on how the model used the web (search, open_page, find).
622
+ * Includes details on how the model used the web (search, open_page, find_in_page).
623
623
  */
624
624
  action: {
625
625
  /**
@@ -641,9 +641,9 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderToolFactoryWithOu
641
641
  url?: string | null;
642
642
  } | {
643
643
  /**
644
- * Action type "find": Searches for a pattern within a loaded page.
644
+ * Action type "findInPage": Searches for a pattern within a loaded page.
645
645
  */
646
- type: "find";
646
+ type: "findInPage";
647
647
  /**
648
648
  * The URL of the page searched for the pattern.
649
649
  */
@@ -619,7 +619,7 @@ declare const webSearchPreviewInputSchema: _ai_sdk_provider_utils.LazySchema<Rec
619
619
  declare const webSearchPreview: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
620
620
  /**
621
621
  * An object describing the specific action taken in this web search call.
622
- * Includes details on how the model used the web (search, open_page, find).
622
+ * Includes details on how the model used the web (search, open_page, find_in_page).
623
623
  */
624
624
  action: {
625
625
  /**
@@ -641,9 +641,9 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderToolFactoryWithOu
641
641
  url?: string | null;
642
642
  } | {
643
643
  /**
644
- * Action type "find": Searches for a pattern within a loaded page.
644
+ * Action type "findInPage": Searches for a pattern within a loaded page.
645
645
  */
646
- type: "find";
646
+ type: "findInPage";
647
647
  /**
648
648
  * The URL of the page searched for the pattern.
649
649
  */
@@ -373,10 +373,12 @@ var openaiChatResponseSchema = (0, import_provider_utils3.lazySchema)(
373
373
  annotations: import_v42.z.array(
374
374
  import_v42.z.object({
375
375
  type: import_v42.z.literal("url_citation"),
376
- start_index: import_v42.z.number(),
377
- end_index: import_v42.z.number(),
378
- url: import_v42.z.string(),
379
- title: import_v42.z.string()
376
+ url_citation: import_v42.z.object({
377
+ start_index: import_v42.z.number(),
378
+ end_index: import_v42.z.number(),
379
+ url: import_v42.z.string(),
380
+ title: import_v42.z.string()
381
+ })
380
382
  })
381
383
  ).nullish()
382
384
  }),
@@ -440,10 +442,12 @@ var openaiChatChunkSchema = (0, import_provider_utils3.lazySchema)(
440
442
  annotations: import_v42.z.array(
441
443
  import_v42.z.object({
442
444
  type: import_v42.z.literal("url_citation"),
443
- start_index: import_v42.z.number(),
444
- end_index: import_v42.z.number(),
445
- url: import_v42.z.string(),
446
- title: import_v42.z.string()
445
+ url_citation: import_v42.z.object({
446
+ start_index: import_v42.z.number(),
447
+ end_index: import_v42.z.number(),
448
+ url: import_v42.z.string(),
449
+ title: import_v42.z.string()
450
+ })
447
451
  })
448
452
  ).nullish()
449
453
  }).nullish(),
@@ -879,8 +883,8 @@ var OpenAIChatLanguageModel = class {
879
883
  type: "source",
880
884
  sourceType: "url",
881
885
  id: (0, import_provider_utils5.generateId)(),
882
- url: annotation.url,
883
- title: annotation.title
886
+ url: annotation.url_citation.url,
887
+ title: annotation.url_citation.title
884
888
  });
885
889
  }
886
890
  const completionTokenDetails = (_d = response.usage) == null ? void 0 : _d.completion_tokens_details;
@@ -1095,8 +1099,8 @@ var OpenAIChatLanguageModel = class {
1095
1099
  type: "source",
1096
1100
  sourceType: "url",
1097
1101
  id: (0, import_provider_utils5.generateId)(),
1098
- url: annotation.url,
1099
- title: annotation.title
1102
+ url: annotation.url_citation.url,
1103
+ title: annotation.url_citation.title
1100
1104
  });
1101
1105
  }
1102
1106
  }
@@ -2899,7 +2903,7 @@ var openaiResponsesChunkSchema = (0, import_provider_utils23.lazySchema)(
2899
2903
  url: import_v416.z.string().nullish()
2900
2904
  }),
2901
2905
  import_v416.z.object({
2902
- type: import_v416.z.literal("find"),
2906
+ type: import_v416.z.literal("find_in_page"),
2903
2907
  url: import_v416.z.string().nullish(),
2904
2908
  pattern: import_v416.z.string().nullish()
2905
2909
  })
@@ -3203,7 +3207,7 @@ var openaiResponsesResponseSchema = (0, import_provider_utils23.lazySchema)(
3203
3207
  url: import_v416.z.string().nullish()
3204
3208
  }),
3205
3209
  import_v416.z.object({
3206
- type: import_v416.z.literal("find"),
3210
+ type: import_v416.z.literal("find_in_page"),
3207
3211
  url: import_v416.z.string().nullish(),
3208
3212
  pattern: import_v416.z.string().nullish()
3209
3213
  })
@@ -3830,7 +3834,7 @@ var webSearchOutputSchema = (0, import_provider_utils29.lazySchema)(
3830
3834
  url: import_v422.z.string().nullish()
3831
3835
  }),
3832
3836
  import_v422.z.object({
3833
- type: import_v422.z.literal("find"),
3837
+ type: import_v422.z.literal("findInPage"),
3834
3838
  url: import_v422.z.string().nullish(),
3835
3839
  pattern: import_v422.z.string().nullish()
3836
3840
  })
@@ -3883,7 +3887,7 @@ var webSearchPreviewOutputSchema = (0, import_provider_utils30.lazySchema)(
3883
3887
  url: import_v423.z.string().nullish()
3884
3888
  }),
3885
3889
  import_v423.z.object({
3886
- type: import_v423.z.literal("find"),
3890
+ type: import_v423.z.literal("findInPage"),
3887
3891
  url: import_v423.z.string().nullish(),
3888
3892
  pattern: import_v423.z.string().nullish()
3889
3893
  })
@@ -5408,9 +5412,13 @@ function mapWebSearchOutput(action) {
5408
5412
  };
5409
5413
  case "open_page":
5410
5414
  return { action: { type: "openPage", url: action.url } };
5411
- case "find":
5415
+ case "find_in_page":
5412
5416
  return {
5413
- action: { type: "find", url: action.url, pattern: action.pattern }
5417
+ action: {
5418
+ type: "findInPage",
5419
+ url: action.url,
5420
+ pattern: action.pattern
5421
+ }
5414
5422
  };
5415
5423
  }
5416
5424
  }