@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.
@@ -3201,6 +3201,7 @@ import { z as z18 } from "zod/v4";
3201
3201
  var webSearchArgsSchema = lazySchema4(
3202
3202
  () => zodSchema16(
3203
3203
  z18.object({
3204
+ externalWebAccess: z18.boolean().optional(),
3204
3205
  filters: z18.object({ allowedDomains: z18.array(z18.string()).optional() }).optional(),
3205
3206
  searchContextSize: z18.enum(["low", "medium", "high"]).optional(),
3206
3207
  userLocation: z18.object({
@@ -3409,6 +3410,7 @@ async function prepareResponsesTools({
3409
3410
  openaiTools.push({
3410
3411
  type: "web_search",
3411
3412
  filters: args.filters != null ? { allowed_domains: args.filters.allowedDomains } : void 0,
3413
+ external_web_access: args.externalWebAccess,
3412
3414
  search_context_size: args.searchContextSize,
3413
3415
  user_location: args.userLocation
3414
3416
  });
@@ -4141,8 +4143,21 @@ var OpenAIResponsesLanguageModel = class {
4141
4143
  }
4142
4144
  });
4143
4145
  }
4144
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type !== "message") {
4145
- if (value.item.type === "function_call") {
4146
+ } else if (isResponseOutputItemDoneChunk(value)) {
4147
+ if (value.item.type === "message") {
4148
+ controller.enqueue({
4149
+ type: "text-end",
4150
+ id: value.item.id,
4151
+ providerMetadata: {
4152
+ openai: {
4153
+ itemId: value.item.id,
4154
+ ...ongoingAnnotations.length > 0 && {
4155
+ annotations: ongoingAnnotations
4156
+ }
4157
+ }
4158
+ }
4159
+ });
4160
+ } else if (value.item.type === "function_call") {
4146
4161
  ongoingToolCalls[value.output_index] = void 0;
4147
4162
  hasFunctionCall = true;
4148
4163
  controller.enqueue({
@@ -4423,19 +4438,6 @@ var OpenAIResponsesLanguageModel = class {
4423
4438
  } : {}
4424
4439
  });
4425
4440
  }
4426
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type === "message") {
4427
- controller.enqueue({
4428
- type: "text-end",
4429
- id: value.item.id,
4430
- providerMetadata: {
4431
- openai: {
4432
- itemId: value.item.id,
4433
- ...ongoingAnnotations.length > 0 && {
4434
- annotations: ongoingAnnotations
4435
- }
4436
- }
4437
- }
4438
- });
4439
4441
  } else if (isErrorChunk(value)) {
4440
4442
  controller.enqueue({ type: "error", error: value });
4441
4443
  }