@ai-sdk/openai 3.0.0-beta.68 → 3.0.0-beta.69

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.
@@ -4448,8 +4448,21 @@ var OpenAIResponsesLanguageModel = class {
4448
4448
  }
4449
4449
  });
4450
4450
  }
4451
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type !== "message") {
4452
- if (value.item.type === "function_call") {
4451
+ } else if (isResponseOutputItemDoneChunk(value)) {
4452
+ if (value.item.type === "message") {
4453
+ controller.enqueue({
4454
+ type: "text-end",
4455
+ id: value.item.id,
4456
+ providerMetadata: {
4457
+ [providerKey]: {
4458
+ itemId: value.item.id,
4459
+ ...ongoingAnnotations.length > 0 && {
4460
+ annotations: ongoingAnnotations
4461
+ }
4462
+ }
4463
+ }
4464
+ });
4465
+ } else if (value.item.type === "function_call") {
4453
4466
  ongoingToolCalls[value.output_index] = void 0;
4454
4467
  hasFunctionCall = true;
4455
4468
  controller.enqueue({
@@ -4818,19 +4831,6 @@ var OpenAIResponsesLanguageModel = class {
4818
4831
  }
4819
4832
  });
4820
4833
  }
4821
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type === "message") {
4822
- controller.enqueue({
4823
- type: "text-end",
4824
- id: value.item.id,
4825
- providerMetadata: {
4826
- [providerKey]: {
4827
- itemId: value.item.id,
4828
- ...ongoingAnnotations.length > 0 && {
4829
- annotations: ongoingAnnotations
4830
- }
4831
- }
4832
- }
4833
- });
4834
4834
  } else if (isErrorChunk(value)) {
4835
4835
  controller.enqueue({ type: "error", error: value });
4836
4836
  }