@ai-sdk/openai 4.0.17 → 4.0.18
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
package/dist/index.js
CHANGED
|
@@ -3706,7 +3706,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3706
3706
|
hasComputerTool = false,
|
|
3707
3707
|
customProviderToolNames
|
|
3708
3708
|
}) {
|
|
3709
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
3709
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
|
|
3710
3710
|
let input = [];
|
|
3711
3711
|
const warnings = [];
|
|
3712
3712
|
const processedApprovalIds = /* @__PURE__ */ new Set();
|
|
@@ -4065,7 +4065,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4065
4065
|
part.toolName
|
|
4066
4066
|
);
|
|
4067
4067
|
if (resolvedResultToolName === "tool_search") {
|
|
4068
|
-
const itemId = (
|
|
4068
|
+
const itemId = (_s = (_r = (_o = (_n = part.providerOptions) == null ? void 0 : _n[providerOptionsName]) == null ? void 0 : _o.itemId) != null ? _r : (_q = (_p = part.providerMetadata) == null ? void 0 : _p[providerOptionsName]) == null ? void 0 : _q.itemId) != null ? _s : part.toolCallId;
|
|
4069
4069
|
if (store) {
|
|
4070
4070
|
input.push({ type: "item_reference", id: itemId });
|
|
4071
4071
|
} else if (part.output.type === "json") {
|
|
@@ -4106,7 +4106,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4106
4106
|
break;
|
|
4107
4107
|
}
|
|
4108
4108
|
if (store) {
|
|
4109
|
-
const itemId = (
|
|
4109
|
+
const itemId = (_v = (_u = (_t = part.providerOptions) == null ? void 0 : _t[providerOptionsName]) == null ? void 0 : _u.itemId) != null ? _v : part.toolCallId;
|
|
4110
4110
|
input.push({ type: "item_reference", id: itemId });
|
|
4111
4111
|
} else {
|
|
4112
4112
|
warnings.push({
|
|
@@ -4191,7 +4191,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4191
4191
|
}
|
|
4192
4192
|
case "custom": {
|
|
4193
4193
|
if (part.kind === "openai.compaction") {
|
|
4194
|
-
const providerOptions2 = (
|
|
4194
|
+
const providerOptions2 = (_w = part.providerOptions) == null ? void 0 : _w[providerOptionsName];
|
|
4195
4195
|
const id = providerOptions2 == null ? void 0 : providerOptions2.itemId;
|
|
4196
4196
|
if (hasConversation && id != null) {
|
|
4197
4197
|
break;
|
|
@@ -4238,7 +4238,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4238
4238
|
}
|
|
4239
4239
|
const output = part.output;
|
|
4240
4240
|
if (output.type === "execution-denied") {
|
|
4241
|
-
const approvalId = (
|
|
4241
|
+
const approvalId = (_y = (_x = output.providerOptions) == null ? void 0 : _x.openai) == null ? void 0 : _y.approvalId;
|
|
4242
4242
|
if (approvalId) {
|
|
4243
4243
|
continue;
|
|
4244
4244
|
}
|
|
@@ -4318,7 +4318,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4318
4318
|
file_id: parsedOutput.output.fileId,
|
|
4319
4319
|
detail: parsedOutput.output.detail
|
|
4320
4320
|
},
|
|
4321
|
-
acknowledged_safety_checks: (
|
|
4321
|
+
acknowledged_safety_checks: (_z = parsedOutput.acknowledgedSafetyChecks) == null ? void 0 : _z.map((safetyCheck) => ({
|
|
4322
4322
|
id: safetyCheck.id,
|
|
4323
4323
|
code: safetyCheck.code,
|
|
4324
4324
|
message: safetyCheck.message
|
|
@@ -4334,7 +4334,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4334
4334
|
outputValue = output.value;
|
|
4335
4335
|
break;
|
|
4336
4336
|
case "execution-denied":
|
|
4337
|
-
outputValue = (
|
|
4337
|
+
outputValue = (_A = output.reason) != null ? _A : "Tool call execution denied.";
|
|
4338
4338
|
break;
|
|
4339
4339
|
case "json":
|
|
4340
4340
|
case "error-json":
|
|
@@ -4433,7 +4433,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4433
4433
|
contentValue = output.value;
|
|
4434
4434
|
break;
|
|
4435
4435
|
case "execution-denied":
|
|
4436
|
-
contentValue = (
|
|
4436
|
+
contentValue = (_B = output.reason) != null ? _B : "Tool call execution denied.";
|
|
4437
4437
|
break;
|
|
4438
4438
|
case "json":
|
|
4439
4439
|
case "error-json":
|
|
@@ -8873,7 +8873,7 @@ var OpenAISkills = class {
|
|
|
8873
8873
|
};
|
|
8874
8874
|
|
|
8875
8875
|
// src/version.ts
|
|
8876
|
-
var VERSION = true ? "4.0.
|
|
8876
|
+
var VERSION = true ? "4.0.18" : "0.0.0-test";
|
|
8877
8877
|
|
|
8878
8878
|
// src/openai-provider.ts
|
|
8879
8879
|
function createOpenAI(options = {}) {
|