@zenning/openai 3.0.13 → 3.0.15
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 +13 -0
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -11
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +10 -10
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +10 -10
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/internal/index.mjs
CHANGED
|
@@ -2496,10 +2496,8 @@ async function convertToOpenAIResponsesInput({
|
|
|
2496
2496
|
const input = [];
|
|
2497
2497
|
const warnings = [];
|
|
2498
2498
|
const processedApprovalIds = /* @__PURE__ */ new Set();
|
|
2499
|
-
const
|
|
2500
|
-
|
|
2501
|
-
);
|
|
2502
|
-
console.log("[OpenAI Provider] Approval continuation detected:", hasApprovalResponses);
|
|
2499
|
+
const skipItemReferences = (providerOptionsName && (store == null ? void 0 : store.skipItemReferencesForApproval)) === true;
|
|
2500
|
+
console.log("[OpenAI Provider] Skip item references flag:", skipItemReferences);
|
|
2503
2501
|
if (compactionInput && compactionInput.length > 0) {
|
|
2504
2502
|
input.push(...compactionInput);
|
|
2505
2503
|
}
|
|
@@ -2594,29 +2592,31 @@ async function convertToOpenAIResponsesInput({
|
|
|
2594
2592
|
}
|
|
2595
2593
|
case "tool-call": {
|
|
2596
2594
|
const id = (_g = (_d = (_c = part.providerOptions) == null ? void 0 : _c[providerOptionsName]) == null ? void 0 : _d.itemId) != null ? _g : (_f = (_e = part.providerMetadata) == null ? void 0 : _e[providerOptionsName]) == null ? void 0 : _f.itemId;
|
|
2597
|
-
const skipItemReference = hasApprovalResponses;
|
|
2598
2595
|
console.log("[OpenAI Provider] Processing tool-call:", {
|
|
2599
2596
|
toolCallId: part.toolCallId,
|
|
2600
2597
|
toolName: part.toolName,
|
|
2601
2598
|
id,
|
|
2602
2599
|
providerExecuted: part.providerExecuted,
|
|
2603
2600
|
store,
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
willCreateItemReference: store && id != null && !skipItemReference
|
|
2601
|
+
skipItemReferences,
|
|
2602
|
+
willCreateItemReference: store && id != null && !skipItemReferences
|
|
2607
2603
|
});
|
|
2608
2604
|
if (part.providerExecuted) {
|
|
2609
|
-
if (store && id != null && !
|
|
2605
|
+
if (store && id != null && !skipItemReferences) {
|
|
2610
2606
|
console.log("[OpenAI Provider] Creating item_reference (providerExecuted)");
|
|
2611
2607
|
input.push({ type: "item_reference", id });
|
|
2612
2608
|
}
|
|
2613
2609
|
break;
|
|
2614
2610
|
}
|
|
2615
|
-
if (store && id != null && !
|
|
2611
|
+
if (store && id != null && !skipItemReferences) {
|
|
2616
2612
|
console.log("[OpenAI Provider] Creating item_reference (non-providerExecuted)");
|
|
2617
2613
|
input.push({ type: "item_reference", id });
|
|
2618
2614
|
break;
|
|
2619
2615
|
}
|
|
2616
|
+
if (skipItemReferences) {
|
|
2617
|
+
console.log("[OpenAI Provider] Skipping function_call due to approval continuation flag");
|
|
2618
|
+
break;
|
|
2619
|
+
}
|
|
2620
2620
|
const resolvedToolName = toolNameMapping.toProviderToolName(
|
|
2621
2621
|
part.toolName
|
|
2622
2622
|
);
|