@ai-sdk/openai 3.0.85 → 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 +13 -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 +2 -2
- package/src/responses/convert-to-openai-responses-input.ts +9 -5
package/dist/internal/index.js
CHANGED
|
@@ -2932,7 +2932,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2932
2932
|
hasApplyPatchTool = false,
|
|
2933
2933
|
customProviderToolNames
|
|
2934
2934
|
}) {
|
|
2935
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
2935
|
+
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;
|
|
2936
2936
|
let input = [];
|
|
2937
2937
|
const warnings = [];
|
|
2938
2938
|
const processedApprovalIds = /* @__PURE__ */ new Set();
|
|
@@ -3209,7 +3209,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3209
3209
|
part.toolName
|
|
3210
3210
|
);
|
|
3211
3211
|
if (resolvedResultToolName === "tool_search") {
|
|
3212
|
-
const itemId = (
|
|
3212
|
+
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;
|
|
3213
3213
|
if (store) {
|
|
3214
3214
|
input.push({ type: "item_reference", id: itemId });
|
|
3215
3215
|
} else if (part.output.type === "json") {
|
|
@@ -3250,7 +3250,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3250
3250
|
break;
|
|
3251
3251
|
}
|
|
3252
3252
|
if (store) {
|
|
3253
|
-
const itemId = (
|
|
3253
|
+
const itemId = (_v = (_u = (_t = part.providerOptions) == null ? void 0 : _t[providerOptionsName]) == null ? void 0 : _u.itemId) != null ? _v : part.toolCallId;
|
|
3254
3254
|
input.push({ type: "item_reference", id: itemId });
|
|
3255
3255
|
} else {
|
|
3256
3256
|
warnings.push({
|
|
@@ -3360,7 +3360,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3360
3360
|
}
|
|
3361
3361
|
const output = part.output;
|
|
3362
3362
|
if (output.type === "execution-denied") {
|
|
3363
|
-
const approvalId = (
|
|
3363
|
+
const approvalId = (_x = (_w = output.providerOptions) == null ? void 0 : _w.openai) == null ? void 0 : _x.approvalId;
|
|
3364
3364
|
if (approvalId) {
|
|
3365
3365
|
continue;
|
|
3366
3366
|
}
|
|
@@ -3434,7 +3434,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3434
3434
|
outputValue = output.value;
|
|
3435
3435
|
break;
|
|
3436
3436
|
case "execution-denied":
|
|
3437
|
-
outputValue = (
|
|
3437
|
+
outputValue = (_y = output.reason) != null ? _y : "Tool call execution denied.";
|
|
3438
3438
|
break;
|
|
3439
3439
|
case "json":
|
|
3440
3440
|
case "error-json":
|
|
@@ -3517,7 +3517,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3517
3517
|
contentValue = output.value;
|
|
3518
3518
|
break;
|
|
3519
3519
|
case "execution-denied":
|
|
3520
|
-
contentValue = (
|
|
3520
|
+
contentValue = (_z = output.reason) != null ? _z : "Tool call execution denied.";
|
|
3521
3521
|
break;
|
|
3522
3522
|
case "json":
|
|
3523
3523
|
case "error-json":
|