@zenning/openai 3.0.13 → 3.0.14

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.
@@ -2496,10 +2496,8 @@ async function convertToOpenAIResponsesInput({
2496
2496
  const input = [];
2497
2497
  const warnings = [];
2498
2498
  const processedApprovalIds = /* @__PURE__ */ new Set();
2499
- const hasApprovalResponses = prompt.some(
2500
- (message) => message.role === "tool" && message.content.some((part) => part.type === "tool-approval-response")
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,25 +2592,23 @@ 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
- hasApprovalResponses,
2605
- skipItemReference,
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 && !skipItemReference) {
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 && !skipItemReference) {
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;