@ai-sdk/openai 2.0.71 → 2.0.73

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({
@@ -3117,6 +3118,7 @@ async function prepareResponsesTools({
3117
3118
  openaiTools2.push({
3118
3119
  type: "web_search",
3119
3120
  filters: args.filters != null ? { allowed_domains: args.filters.allowedDomains } : void 0,
3121
+ external_web_access: args.externalWebAccess,
3120
3122
  search_context_size: args.searchContextSize,
3121
3123
  user_location: args.userLocation
3122
3124
  });
@@ -3849,8 +3851,21 @@ var OpenAIResponsesLanguageModel = class {
3849
3851
  }
3850
3852
  });
3851
3853
  }
3852
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type !== "message") {
3853
- if (value.item.type === "function_call") {
3854
+ } else if (isResponseOutputItemDoneChunk(value)) {
3855
+ if (value.item.type === "message") {
3856
+ controller.enqueue({
3857
+ type: "text-end",
3858
+ id: value.item.id,
3859
+ providerMetadata: {
3860
+ openai: {
3861
+ itemId: value.item.id,
3862
+ ...ongoingAnnotations.length > 0 && {
3863
+ annotations: ongoingAnnotations
3864
+ }
3865
+ }
3866
+ }
3867
+ });
3868
+ } else if (value.item.type === "function_call") {
3854
3869
  ongoingToolCalls[value.output_index] = void 0;
3855
3870
  hasFunctionCall = true;
3856
3871
  controller.enqueue({
@@ -4131,19 +4146,6 @@ var OpenAIResponsesLanguageModel = class {
4131
4146
  } : {}
4132
4147
  });
4133
4148
  }
4134
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type === "message") {
4135
- controller.enqueue({
4136
- type: "text-end",
4137
- id: value.item.id,
4138
- providerMetadata: {
4139
- openai: {
4140
- itemId: value.item.id,
4141
- ...ongoingAnnotations.length > 0 && {
4142
- annotations: ongoingAnnotations
4143
- }
4144
- }
4145
- }
4146
- });
4147
4149
  } else if (isErrorChunk(value)) {
4148
4150
  controller.enqueue({ type: "error", error: value });
4149
4151
  }
@@ -4619,7 +4621,7 @@ var OpenAITranscriptionModel = class {
4619
4621
  };
4620
4622
 
4621
4623
  // src/version.ts
4622
- var VERSION = true ? "2.0.71" : "0.0.0-test";
4624
+ var VERSION = true ? "2.0.73" : "0.0.0-test";
4623
4625
 
4624
4626
  // src/openai-provider.ts
4625
4627
  function createOpenAI(options = {}) {