@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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 3.0.16
4
+
5
+ ### Patch Changes
6
+
7
+ - approvals6
8
+
9
+ ## 3.0.15
10
+
11
+ ### Patch Changes
12
+
13
+ - approvals5
14
+
3
15
  ## 3.0.14
4
16
 
5
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -2478,13 +2478,14 @@ async function convertToOpenAIResponsesInput({
2478
2478
  hasLocalShellTool = false,
2479
2479
  hasShellTool = false,
2480
2480
  hasApplyPatchTool = false,
2481
- compactionInput
2481
+ compactionInput,
2482
+ providerOptions
2482
2483
  }) {
2483
2484
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
2484
2485
  const input = [];
2485
2486
  const warnings = [];
2486
2487
  const processedApprovalIds = /* @__PURE__ */ new Set();
2487
- const skipItemReferences = (providerOptionsName && (store == null ? void 0 : store.skipItemReferencesForApproval)) === true;
2488
+ const skipItemReferences = (providerOptions == null ? void 0 : providerOptions.skipItemReferencesForApproval) === true;
2488
2489
  console.log("[OpenAI Provider] Skip item references flag:", skipItemReferences);
2489
2490
  if (compactionInput && compactionInput.length > 0) {
2490
2491
  input.push(...compactionInput);
@@ -2601,6 +2602,10 @@ async function convertToOpenAIResponsesInput({
2601
2602
  input.push({ type: "item_reference", id });
2602
2603
  break;
2603
2604
  }
2605
+ if (skipItemReferences) {
2606
+ console.log("[OpenAI Provider] Skipping function_call due to approval continuation flag");
2607
+ break;
2608
+ }
2604
2609
  const resolvedToolName = toolNameMapping.toProviderToolName(
2605
2610
  part.toolName
2606
2611
  );
@@ -2668,12 +2673,12 @@ async function convertToOpenAIResponsesInput({
2668
2673
  break;
2669
2674
  }
2670
2675
  case "reasoning": {
2671
- const providerOptions = await (0, import_provider_utils23.parseProviderOptions)({
2676
+ const providerOptions2 = await (0, import_provider_utils23.parseProviderOptions)({
2672
2677
  provider: providerOptionsName,
2673
2678
  providerOptions: part.providerOptions,
2674
2679
  schema: openaiResponsesReasoningProviderOptionsSchema
2675
2680
  });
2676
- const reasoningId = providerOptions == null ? void 0 : providerOptions.itemId;
2681
+ const reasoningId = providerOptions2 == null ? void 0 : providerOptions2.itemId;
2677
2682
  if (reasoningId != null) {
2678
2683
  const reasoningMessage = reasoningMessages[reasoningId];
2679
2684
  if (store) {
@@ -2702,14 +2707,14 @@ async function convertToOpenAIResponsesInput({
2702
2707
  reasoningMessages[reasoningId] = {
2703
2708
  type: "reasoning",
2704
2709
  id: reasoningId,
2705
- encrypted_content: providerOptions == null ? void 0 : providerOptions.reasoningEncryptedContent,
2710
+ encrypted_content: providerOptions2 == null ? void 0 : providerOptions2.reasoningEncryptedContent,
2706
2711
  summary: summaryParts
2707
2712
  };
2708
2713
  input.push(reasoningMessages[reasoningId]);
2709
2714
  } else {
2710
2715
  reasoningMessage.summary.push(...summaryParts);
2711
- if ((providerOptions == null ? void 0 : providerOptions.reasoningEncryptedContent) != null) {
2712
- reasoningMessage.encrypted_content = providerOptions.reasoningEncryptedContent;
2716
+ if ((providerOptions2 == null ? void 0 : providerOptions2.reasoningEncryptedContent) != null) {
2717
+ reasoningMessage.encrypted_content = providerOptions2.reasoningEncryptedContent;
2713
2718
  }
2714
2719
  }
2715
2720
  }
@@ -4098,7 +4103,8 @@ var OpenAIResponsesLanguageModel = class {
4098
4103
  hasLocalShellTool: hasOpenAITool("openai.local_shell"),
4099
4104
  hasShellTool: hasOpenAITool("openai.shell"),
4100
4105
  hasApplyPatchTool: hasOpenAITool("openai.apply_patch"),
4101
- compactionInput: openaiOptions == null ? void 0 : openaiOptions.compactionInput
4106
+ compactionInput: openaiOptions == null ? void 0 : openaiOptions.compactionInput,
4107
+ providerOptions: openaiOptions
4102
4108
  });
4103
4109
  warnings.push(...inputWarnings);
4104
4110
  const strictJsonSchema = (_d = openaiOptions == null ? void 0 : openaiOptions.strictJsonSchema) != null ? _d : true;
@@ -5784,7 +5790,7 @@ var OpenAITranscriptionModel = class {
5784
5790
  };
5785
5791
 
5786
5792
  // src/version.ts
5787
- var VERSION = true ? "3.0.13" : "0.0.0-test";
5793
+ var VERSION = true ? "3.0.15" : "0.0.0-test";
5788
5794
 
5789
5795
  // src/openai-provider.ts
5790
5796
  function createOpenAI(options = {}) {