@ai-sdk/openai 3.0.0-beta.67 → 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.
@@ -4487,8 +4487,21 @@ var OpenAIResponsesLanguageModel = class {
4487
4487
  }
4488
4488
  });
4489
4489
  }
4490
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type !== "message") {
4491
- if (value.item.type === "function_call") {
4490
+ } else if (isResponseOutputItemDoneChunk(value)) {
4491
+ if (value.item.type === "message") {
4492
+ controller.enqueue({
4493
+ type: "text-end",
4494
+ id: value.item.id,
4495
+ providerMetadata: {
4496
+ [providerKey]: {
4497
+ itemId: value.item.id,
4498
+ ...ongoingAnnotations.length > 0 && {
4499
+ annotations: ongoingAnnotations
4500
+ }
4501
+ }
4502
+ }
4503
+ });
4504
+ } else if (value.item.type === "function_call") {
4492
4505
  ongoingToolCalls[value.output_index] = void 0;
4493
4506
  hasFunctionCall = true;
4494
4507
  controller.enqueue({
@@ -4857,19 +4870,6 @@ var OpenAIResponsesLanguageModel = class {
4857
4870
  }
4858
4871
  });
4859
4872
  }
4860
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type === "message") {
4861
- controller.enqueue({
4862
- type: "text-end",
4863
- id: value.item.id,
4864
- providerMetadata: {
4865
- [providerKey]: {
4866
- itemId: value.item.id,
4867
- ...ongoingAnnotations.length > 0 && {
4868
- annotations: ongoingAnnotations
4869
- }
4870
- }
4871
- }
4872
- });
4873
4873
  } else if (isErrorChunk(value)) {
4874
4874
  controller.enqueue({ type: "error", error: value });
4875
4875
  }