@ai-sdk/openai 2.0.70 → 2.0.72

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/dist/index.mjs CHANGED
@@ -1963,6 +1963,7 @@ import { z as z13 } from "zod/v4";
1963
1963
  var webSearchArgsSchema = lazySchema5(
1964
1964
  () => zodSchema12(
1965
1965
  z13.object({
1966
+ externalWebAccess: z13.boolean().optional(),
1966
1967
  filters: z13.object({ allowedDomains: z13.array(z13.string()).optional() }).optional(),
1967
1968
  searchContextSize: z13.enum(["low", "medium", "high"]).optional(),
1968
1969
  userLocation: z13.object({
@@ -2684,6 +2685,8 @@ var openaiResponsesChunkSchema = lazyValidator8(
2684
2685
  annotation: z16.discriminatedUnion("type", [
2685
2686
  z16.object({
2686
2687
  type: z16.literal("url_citation"),
2688
+ start_index: z16.number(),
2689
+ end_index: z16.number(),
2687
2690
  url: z16.string(),
2688
2691
  title: z16.string()
2689
2692
  }),
@@ -3115,6 +3118,7 @@ async function prepareResponsesTools({
3115
3118
  openaiTools2.push({
3116
3119
  type: "web_search",
3117
3120
  filters: args.filters != null ? { allowed_domains: args.filters.allowedDomains } : void 0,
3121
+ external_web_access: args.externalWebAccess,
3118
3122
  search_context_size: args.searchContextSize,
3119
3123
  user_location: args.userLocation
3120
3124
  });
@@ -3770,7 +3774,7 @@ var OpenAIResponsesLanguageModel = class {
3770
3774
  controller.enqueue({
3771
3775
  type: "tool-call",
3772
3776
  toolCallId: value.item.id,
3773
- toolName: "web_search",
3777
+ toolName: webSearchToolName != null ? webSearchToolName : "web_search",
3774
3778
  input: JSON.stringify({}),
3775
3779
  providerExecuted: true
3776
3780
  });
@@ -3871,7 +3875,7 @@ var OpenAIResponsesLanguageModel = class {
3871
3875
  controller.enqueue({
3872
3876
  type: "tool-result",
3873
3877
  toolCallId: value.item.id,
3874
- toolName: "web_search",
3878
+ toolName: webSearchToolName != null ? webSearchToolName : "web_search",
3875
3879
  result: mapWebSearchOutput(value.item.action),
3876
3880
  providerExecuted: true
3877
3881
  });
@@ -4617,7 +4621,7 @@ var OpenAITranscriptionModel = class {
4617
4621
  };
4618
4622
 
4619
4623
  // src/version.ts
4620
- var VERSION = true ? "2.0.70" : "0.0.0-test";
4624
+ var VERSION = true ? "2.0.72" : "0.0.0-test";
4621
4625
 
4622
4626
  // src/openai-provider.ts
4623
4627
  function createOpenAI(options = {}) {