@ai-sdk/openai 4.0.86 → 4.0.87

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.
@@ -3588,6 +3588,7 @@ async function convertToOpenAIResponsesInput({ prompt, toolNameMapping, systemMe
3588
3588
  break;
3589
3589
  case "assistant": {
3590
3590
  const reasoningMessages = {};
3591
+ const emittedTextItemIds = /* @__PURE__ */ new Set();
3591
3592
  for (const part of content) switch (part.type) {
3592
3593
  case "text": {
3593
3594
  const providerOptions = part.providerOptions?.[providerOptionsName];
@@ -3595,10 +3596,13 @@ async function convertToOpenAIResponsesInput({ prompt, toolNameMapping, systemMe
3595
3596
  const phase = providerOptions?.phase;
3596
3597
  if (hasConversation && id != null) break;
3597
3598
  if (store && id != null) {
3598
- input.push({
3599
- type: "item_reference",
3600
- id
3601
- });
3599
+ if (!emittedTextItemIds.has(id)) {
3600
+ emittedTextItemIds.add(id);
3601
+ input.push({
3602
+ type: "item_reference",
3603
+ id
3604
+ });
3605
+ }
3602
3606
  break;
3603
3607
  }
3604
3608
  input.push({