@ai-sdk/openai 2.0.72 → 2.0.74

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.
@@ -4143,8 +4143,21 @@ var OpenAIResponsesLanguageModel = class {
4143
4143
  }
4144
4144
  });
4145
4145
  }
4146
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type !== "message") {
4147
- 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") {
4148
4161
  ongoingToolCalls[value.output_index] = void 0;
4149
4162
  hasFunctionCall = true;
4150
4163
  controller.enqueue({
@@ -4425,19 +4438,6 @@ var OpenAIResponsesLanguageModel = class {
4425
4438
  } : {}
4426
4439
  });
4427
4440
  }
4428
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type === "message") {
4429
- controller.enqueue({
4430
- type: "text-end",
4431
- id: value.item.id,
4432
- providerMetadata: {
4433
- openai: {
4434
- itemId: value.item.id,
4435
- ...ongoingAnnotations.length > 0 && {
4436
- annotations: ongoingAnnotations
4437
- }
4438
- }
4439
- }
4440
- });
4441
4441
  } else if (isErrorChunk(value)) {
4442
4442
  controller.enqueue({ type: "error", error: value });
4443
4443
  }