@zenning/openai 3.0.14 → 3.0.16

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.
@@ -2490,13 +2490,14 @@ async function convertToOpenAIResponsesInput({
2490
2490
  hasLocalShellTool = false,
2491
2491
  hasShellTool = false,
2492
2492
  hasApplyPatchTool = false,
2493
- compactionInput
2493
+ compactionInput,
2494
+ providerOptions
2494
2495
  }) {
2495
2496
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
2496
2497
  const input = [];
2497
2498
  const warnings = [];
2498
2499
  const processedApprovalIds = /* @__PURE__ */ new Set();
2499
- const skipItemReferences = (providerOptionsName && (store == null ? void 0 : store.skipItemReferencesForApproval)) === true;
2500
+ const skipItemReferences = (providerOptions == null ? void 0 : providerOptions.skipItemReferencesForApproval) === true;
2500
2501
  console.log("[OpenAI Provider] Skip item references flag:", skipItemReferences);
2501
2502
  if (compactionInput && compactionInput.length > 0) {
2502
2503
  input.push(...compactionInput);
@@ -2613,6 +2614,10 @@ async function convertToOpenAIResponsesInput({
2613
2614
  input.push({ type: "item_reference", id });
2614
2615
  break;
2615
2616
  }
2617
+ if (skipItemReferences) {
2618
+ console.log("[OpenAI Provider] Skipping function_call due to approval continuation flag");
2619
+ break;
2620
+ }
2616
2621
  const resolvedToolName = toolNameMapping.toProviderToolName(
2617
2622
  part.toolName
2618
2623
  );
@@ -2680,12 +2685,12 @@ async function convertToOpenAIResponsesInput({
2680
2685
  break;
2681
2686
  }
2682
2687
  case "reasoning": {
2683
- const providerOptions = await parseProviderOptions6({
2688
+ const providerOptions2 = await parseProviderOptions6({
2684
2689
  provider: providerOptionsName,
2685
2690
  providerOptions: part.providerOptions,
2686
2691
  schema: openaiResponsesReasoningProviderOptionsSchema
2687
2692
  });
2688
- const reasoningId = providerOptions == null ? void 0 : providerOptions.itemId;
2693
+ const reasoningId = providerOptions2 == null ? void 0 : providerOptions2.itemId;
2689
2694
  if (reasoningId != null) {
2690
2695
  const reasoningMessage = reasoningMessages[reasoningId];
2691
2696
  if (store) {
@@ -2714,14 +2719,14 @@ async function convertToOpenAIResponsesInput({
2714
2719
  reasoningMessages[reasoningId] = {
2715
2720
  type: "reasoning",
2716
2721
  id: reasoningId,
2717
- encrypted_content: providerOptions == null ? void 0 : providerOptions.reasoningEncryptedContent,
2722
+ encrypted_content: providerOptions2 == null ? void 0 : providerOptions2.reasoningEncryptedContent,
2718
2723
  summary: summaryParts
2719
2724
  };
2720
2725
  input.push(reasoningMessages[reasoningId]);
2721
2726
  } else {
2722
2727
  reasoningMessage.summary.push(...summaryParts);
2723
- if ((providerOptions == null ? void 0 : providerOptions.reasoningEncryptedContent) != null) {
2724
- reasoningMessage.encrypted_content = providerOptions.reasoningEncryptedContent;
2728
+ if ((providerOptions2 == null ? void 0 : providerOptions2.reasoningEncryptedContent) != null) {
2729
+ reasoningMessage.encrypted_content = providerOptions2.reasoningEncryptedContent;
2725
2730
  }
2726
2731
  }
2727
2732
  }
@@ -4428,7 +4433,8 @@ var OpenAIResponsesLanguageModel = class {
4428
4433
  hasLocalShellTool: hasOpenAITool("openai.local_shell"),
4429
4434
  hasShellTool: hasOpenAITool("openai.shell"),
4430
4435
  hasApplyPatchTool: hasOpenAITool("openai.apply_patch"),
4431
- compactionInput: openaiOptions == null ? void 0 : openaiOptions.compactionInput
4436
+ compactionInput: openaiOptions == null ? void 0 : openaiOptions.compactionInput,
4437
+ providerOptions: openaiOptions
4432
4438
  });
4433
4439
  warnings.push(...inputWarnings);
4434
4440
  const strictJsonSchema = (_d = openaiOptions == null ? void 0 : openaiOptions.strictJsonSchema) != null ? _d : true;