@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/index.mjs
CHANGED
|
@@ -2546,13 +2546,14 @@ async function convertToOpenAIResponsesInput({
|
|
|
2546
2546
|
hasLocalShellTool = false,
|
|
2547
2547
|
hasShellTool = false,
|
|
2548
2548
|
hasApplyPatchTool = false,
|
|
2549
|
-
compactionInput
|
|
2549
|
+
compactionInput,
|
|
2550
|
+
providerOptions
|
|
2550
2551
|
}) {
|
|
2551
2552
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
2552
2553
|
const input = [];
|
|
2553
2554
|
const warnings = [];
|
|
2554
2555
|
const processedApprovalIds = /* @__PURE__ */ new Set();
|
|
2555
|
-
const skipItemReferences = (
|
|
2556
|
+
const skipItemReferences = (providerOptions == null ? void 0 : providerOptions.skipItemReferencesForApproval) === true;
|
|
2556
2557
|
console.log("[OpenAI Provider] Skip item references flag:", skipItemReferences);
|
|
2557
2558
|
if (compactionInput && compactionInput.length > 0) {
|
|
2558
2559
|
input.push(...compactionInput);
|
|
@@ -2669,6 +2670,10 @@ async function convertToOpenAIResponsesInput({
|
|
|
2669
2670
|
input.push({ type: "item_reference", id });
|
|
2670
2671
|
break;
|
|
2671
2672
|
}
|
|
2673
|
+
if (skipItemReferences) {
|
|
2674
|
+
console.log("[OpenAI Provider] Skipping function_call due to approval continuation flag");
|
|
2675
|
+
break;
|
|
2676
|
+
}
|
|
2672
2677
|
const resolvedToolName = toolNameMapping.toProviderToolName(
|
|
2673
2678
|
part.toolName
|
|
2674
2679
|
);
|
|
@@ -2736,12 +2741,12 @@ async function convertToOpenAIResponsesInput({
|
|
|
2736
2741
|
break;
|
|
2737
2742
|
}
|
|
2738
2743
|
case "reasoning": {
|
|
2739
|
-
const
|
|
2744
|
+
const providerOptions2 = await parseProviderOptions4({
|
|
2740
2745
|
provider: providerOptionsName,
|
|
2741
2746
|
providerOptions: part.providerOptions,
|
|
2742
2747
|
schema: openaiResponsesReasoningProviderOptionsSchema
|
|
2743
2748
|
});
|
|
2744
|
-
const reasoningId =
|
|
2749
|
+
const reasoningId = providerOptions2 == null ? void 0 : providerOptions2.itemId;
|
|
2745
2750
|
if (reasoningId != null) {
|
|
2746
2751
|
const reasoningMessage = reasoningMessages[reasoningId];
|
|
2747
2752
|
if (store) {
|
|
@@ -2770,14 +2775,14 @@ async function convertToOpenAIResponsesInput({
|
|
|
2770
2775
|
reasoningMessages[reasoningId] = {
|
|
2771
2776
|
type: "reasoning",
|
|
2772
2777
|
id: reasoningId,
|
|
2773
|
-
encrypted_content:
|
|
2778
|
+
encrypted_content: providerOptions2 == null ? void 0 : providerOptions2.reasoningEncryptedContent,
|
|
2774
2779
|
summary: summaryParts
|
|
2775
2780
|
};
|
|
2776
2781
|
input.push(reasoningMessages[reasoningId]);
|
|
2777
2782
|
} else {
|
|
2778
2783
|
reasoningMessage.summary.push(...summaryParts);
|
|
2779
|
-
if ((
|
|
2780
|
-
reasoningMessage.encrypted_content =
|
|
2784
|
+
if ((providerOptions2 == null ? void 0 : providerOptions2.reasoningEncryptedContent) != null) {
|
|
2785
|
+
reasoningMessage.encrypted_content = providerOptions2.reasoningEncryptedContent;
|
|
2781
2786
|
}
|
|
2782
2787
|
}
|
|
2783
2788
|
}
|
|
@@ -4168,7 +4173,8 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
4168
4173
|
hasLocalShellTool: hasOpenAITool("openai.local_shell"),
|
|
4169
4174
|
hasShellTool: hasOpenAITool("openai.shell"),
|
|
4170
4175
|
hasApplyPatchTool: hasOpenAITool("openai.apply_patch"),
|
|
4171
|
-
compactionInput: openaiOptions == null ? void 0 : openaiOptions.compactionInput
|
|
4176
|
+
compactionInput: openaiOptions == null ? void 0 : openaiOptions.compactionInput,
|
|
4177
|
+
providerOptions: openaiOptions
|
|
4172
4178
|
});
|
|
4173
4179
|
warnings.push(...inputWarnings);
|
|
4174
4180
|
const strictJsonSchema = (_d = openaiOptions == null ? void 0 : openaiOptions.strictJsonSchema) != null ? _d : true;
|
|
@@ -5866,7 +5872,7 @@ var OpenAITranscriptionModel = class {
|
|
|
5866
5872
|
};
|
|
5867
5873
|
|
|
5868
5874
|
// src/version.ts
|
|
5869
|
-
var VERSION = true ? "3.0.
|
|
5875
|
+
var VERSION = true ? "3.0.15" : "0.0.0-test";
|
|
5870
5876
|
|
|
5871
5877
|
// src/openai-provider.ts
|
|
5872
5878
|
function createOpenAI(options = {}) {
|