@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.
@@ -3148,6 +3148,7 @@ var import_v418 = require("zod/v4");
3148
3148
  var webSearchArgsSchema = (0, import_provider_utils25.lazySchema)(
3149
3149
  () => (0, import_provider_utils25.zodSchema)(
3150
3150
  import_v418.z.object({
3151
+ externalWebAccess: import_v418.z.boolean().optional(),
3151
3152
  filters: import_v418.z.object({ allowedDomains: import_v418.z.array(import_v418.z.string()).optional() }).optional(),
3152
3153
  searchContextSize: import_v418.z.enum(["low", "medium", "high"]).optional(),
3153
3154
  userLocation: import_v418.z.object({
@@ -3348,6 +3349,7 @@ async function prepareResponsesTools({
3348
3349
  openaiTools.push({
3349
3350
  type: "web_search",
3350
3351
  filters: args.filters != null ? { allowed_domains: args.filters.allowedDomains } : void 0,
3352
+ external_web_access: args.externalWebAccess,
3351
3353
  search_context_size: args.searchContextSize,
3352
3354
  user_location: args.userLocation
3353
3355
  });
@@ -4080,8 +4082,21 @@ var OpenAIResponsesLanguageModel = class {
4080
4082
  }
4081
4083
  });
4082
4084
  }
4083
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type !== "message") {
4084
- if (value.item.type === "function_call") {
4085
+ } else if (isResponseOutputItemDoneChunk(value)) {
4086
+ if (value.item.type === "message") {
4087
+ controller.enqueue({
4088
+ type: "text-end",
4089
+ id: value.item.id,
4090
+ providerMetadata: {
4091
+ openai: {
4092
+ itemId: value.item.id,
4093
+ ...ongoingAnnotations.length > 0 && {
4094
+ annotations: ongoingAnnotations
4095
+ }
4096
+ }
4097
+ }
4098
+ });
4099
+ } else if (value.item.type === "function_call") {
4085
4100
  ongoingToolCalls[value.output_index] = void 0;
4086
4101
  hasFunctionCall = true;
4087
4102
  controller.enqueue({
@@ -4362,19 +4377,6 @@ var OpenAIResponsesLanguageModel = class {
4362
4377
  } : {}
4363
4378
  });
4364
4379
  }
4365
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type === "message") {
4366
- controller.enqueue({
4367
- type: "text-end",
4368
- id: value.item.id,
4369
- providerMetadata: {
4370
- openai: {
4371
- itemId: value.item.id,
4372
- ...ongoingAnnotations.length > 0 && {
4373
- annotations: ongoingAnnotations
4374
- }
4375
- }
4376
- }
4377
- });
4378
4380
  } else if (isErrorChunk(value)) {
4379
4381
  controller.enqueue({ type: "error", error: value });
4380
4382
  }