@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.
@@ -4082,8 +4082,21 @@ var OpenAIResponsesLanguageModel = class {
4082
4082
  }
4083
4083
  });
4084
4084
  }
4085
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type !== "message") {
4086
- 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") {
4087
4100
  ongoingToolCalls[value.output_index] = void 0;
4088
4101
  hasFunctionCall = true;
4089
4102
  controller.enqueue({
@@ -4364,19 +4377,6 @@ var OpenAIResponsesLanguageModel = class {
4364
4377
  } : {}
4365
4378
  });
4366
4379
  }
4367
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type === "message") {
4368
- controller.enqueue({
4369
- type: "text-end",
4370
- id: value.item.id,
4371
- providerMetadata: {
4372
- openai: {
4373
- itemId: value.item.id,
4374
- ...ongoingAnnotations.length > 0 && {
4375
- annotations: ongoingAnnotations
4376
- }
4377
- }
4378
- }
4379
- });
4380
4380
  } else if (isErrorChunk(value)) {
4381
4381
  controller.enqueue({ type: "error", error: value });
4382
4382
  }