@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 +12 -0
- package/dist/index.js +15 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -9
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +14 -8
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +14 -8
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/internal/index.js
CHANGED
|
@@ -2469,13 +2469,14 @@ async function convertToOpenAIResponsesInput({
|
|
|
2469
2469
|
hasLocalShellTool = false,
|
|
2470
2470
|
hasShellTool = false,
|
|
2471
2471
|
hasApplyPatchTool = false,
|
|
2472
|
-
compactionInput
|
|
2472
|
+
compactionInput,
|
|
2473
|
+
providerOptions
|
|
2473
2474
|
}) {
|
|
2474
2475
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
2475
2476
|
const input = [];
|
|
2476
2477
|
const warnings = [];
|
|
2477
2478
|
const processedApprovalIds = /* @__PURE__ */ new Set();
|
|
2478
|
-
const skipItemReferences = (
|
|
2479
|
+
const skipItemReferences = (providerOptions == null ? void 0 : providerOptions.skipItemReferencesForApproval) === true;
|
|
2479
2480
|
console.log("[OpenAI Provider] Skip item references flag:", skipItemReferences);
|
|
2480
2481
|
if (compactionInput && compactionInput.length > 0) {
|
|
2481
2482
|
input.push(...compactionInput);
|
|
@@ -2592,6 +2593,10 @@ async function convertToOpenAIResponsesInput({
|
|
|
2592
2593
|
input.push({ type: "item_reference", id });
|
|
2593
2594
|
break;
|
|
2594
2595
|
}
|
|
2596
|
+
if (skipItemReferences) {
|
|
2597
|
+
console.log("[OpenAI Provider] Skipping function_call due to approval continuation flag");
|
|
2598
|
+
break;
|
|
2599
|
+
}
|
|
2595
2600
|
const resolvedToolName = toolNameMapping.toProviderToolName(
|
|
2596
2601
|
part.toolName
|
|
2597
2602
|
);
|
|
@@ -2659,12 +2664,12 @@ async function convertToOpenAIResponsesInput({
|
|
|
2659
2664
|
break;
|
|
2660
2665
|
}
|
|
2661
2666
|
case "reasoning": {
|
|
2662
|
-
const
|
|
2667
|
+
const providerOptions2 = await (0, import_provider_utils22.parseProviderOptions)({
|
|
2663
2668
|
provider: providerOptionsName,
|
|
2664
2669
|
providerOptions: part.providerOptions,
|
|
2665
2670
|
schema: openaiResponsesReasoningProviderOptionsSchema
|
|
2666
2671
|
});
|
|
2667
|
-
const reasoningId =
|
|
2672
|
+
const reasoningId = providerOptions2 == null ? void 0 : providerOptions2.itemId;
|
|
2668
2673
|
if (reasoningId != null) {
|
|
2669
2674
|
const reasoningMessage = reasoningMessages[reasoningId];
|
|
2670
2675
|
if (store) {
|
|
@@ -2693,14 +2698,14 @@ async function convertToOpenAIResponsesInput({
|
|
|
2693
2698
|
reasoningMessages[reasoningId] = {
|
|
2694
2699
|
type: "reasoning",
|
|
2695
2700
|
id: reasoningId,
|
|
2696
|
-
encrypted_content:
|
|
2701
|
+
encrypted_content: providerOptions2 == null ? void 0 : providerOptions2.reasoningEncryptedContent,
|
|
2697
2702
|
summary: summaryParts
|
|
2698
2703
|
};
|
|
2699
2704
|
input.push(reasoningMessages[reasoningId]);
|
|
2700
2705
|
} else {
|
|
2701
2706
|
reasoningMessage.summary.push(...summaryParts);
|
|
2702
|
-
if ((
|
|
2703
|
-
reasoningMessage.encrypted_content =
|
|
2707
|
+
if ((providerOptions2 == null ? void 0 : providerOptions2.reasoningEncryptedContent) != null) {
|
|
2708
|
+
reasoningMessage.encrypted_content = providerOptions2.reasoningEncryptedContent;
|
|
2704
2709
|
}
|
|
2705
2710
|
}
|
|
2706
2711
|
}
|
|
@@ -4381,7 +4386,8 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
4381
4386
|
hasLocalShellTool: hasOpenAITool("openai.local_shell"),
|
|
4382
4387
|
hasShellTool: hasOpenAITool("openai.shell"),
|
|
4383
4388
|
hasApplyPatchTool: hasOpenAITool("openai.apply_patch"),
|
|
4384
|
-
compactionInput: openaiOptions == null ? void 0 : openaiOptions.compactionInput
|
|
4389
|
+
compactionInput: openaiOptions == null ? void 0 : openaiOptions.compactionInput,
|
|
4390
|
+
providerOptions: openaiOptions
|
|
4385
4391
|
});
|
|
4386
4392
|
warnings.push(...inputWarnings);
|
|
4387
4393
|
const strictJsonSchema = (_d = openaiOptions == null ? void 0 : openaiOptions.strictJsonSchema) != null ? _d : true;
|