@ai-sdk/openai 4.0.85 → 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.
- package/CHANGELOG.md +15 -0
- package/dist/index.js +16 -9
- package/dist/index.js.map +1 -1
- package/dist/internal/index.js +8 -4
- package/dist/internal/index.js.map +1 -1
- package/package.json +3 -3
- package/src/openai-decision-model.ts +7 -7
- package/src/responses/convert-to-openai-responses-input.ts +5 -1
package/dist/internal/index.js
CHANGED
|
@@ -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
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
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({
|