@ai-sdk/openai 3.0.86 → 3.0.87
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 +6 -0
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +6 -6
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +6 -6
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/responses/convert-to-openai-responses-input.ts +9 -5
package/dist/internal/index.mjs
CHANGED
|
@@ -2975,7 +2975,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2975
2975
|
hasApplyPatchTool = false,
|
|
2976
2976
|
customProviderToolNames
|
|
2977
2977
|
}) {
|
|
2978
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
2978
|
+
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;
|
|
2979
2979
|
let input = [];
|
|
2980
2980
|
const warnings = [];
|
|
2981
2981
|
const processedApprovalIds = /* @__PURE__ */ new Set();
|
|
@@ -3252,7 +3252,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3252
3252
|
part.toolName
|
|
3253
3253
|
);
|
|
3254
3254
|
if (resolvedResultToolName === "tool_search") {
|
|
3255
|
-
const itemId = (
|
|
3255
|
+
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;
|
|
3256
3256
|
if (store) {
|
|
3257
3257
|
input.push({ type: "item_reference", id: itemId });
|
|
3258
3258
|
} else if (part.output.type === "json") {
|
|
@@ -3293,7 +3293,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3293
3293
|
break;
|
|
3294
3294
|
}
|
|
3295
3295
|
if (store) {
|
|
3296
|
-
const itemId = (
|
|
3296
|
+
const itemId = (_v = (_u = (_t = part.providerOptions) == null ? void 0 : _t[providerOptionsName]) == null ? void 0 : _u.itemId) != null ? _v : part.toolCallId;
|
|
3297
3297
|
input.push({ type: "item_reference", id: itemId });
|
|
3298
3298
|
} else {
|
|
3299
3299
|
warnings.push({
|
|
@@ -3403,7 +3403,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3403
3403
|
}
|
|
3404
3404
|
const output = part.output;
|
|
3405
3405
|
if (output.type === "execution-denied") {
|
|
3406
|
-
const approvalId = (
|
|
3406
|
+
const approvalId = (_x = (_w = output.providerOptions) == null ? void 0 : _w.openai) == null ? void 0 : _x.approvalId;
|
|
3407
3407
|
if (approvalId) {
|
|
3408
3408
|
continue;
|
|
3409
3409
|
}
|
|
@@ -3477,7 +3477,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3477
3477
|
outputValue = output.value;
|
|
3478
3478
|
break;
|
|
3479
3479
|
case "execution-denied":
|
|
3480
|
-
outputValue = (
|
|
3480
|
+
outputValue = (_y = output.reason) != null ? _y : "Tool call execution denied.";
|
|
3481
3481
|
break;
|
|
3482
3482
|
case "json":
|
|
3483
3483
|
case "error-json":
|
|
@@ -3560,7 +3560,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3560
3560
|
contentValue = output.value;
|
|
3561
3561
|
break;
|
|
3562
3562
|
case "execution-denied":
|
|
3563
|
-
contentValue = (
|
|
3563
|
+
contentValue = (_z = output.reason) != null ? _z : "Tool call execution denied.";
|
|
3564
3564
|
break;
|
|
3565
3565
|
case "json":
|
|
3566
3566
|
case "error-json":
|