@xyd-js/ask-ai-widget 0.0.0-build-2acf05c-20251207022018 → 0.0.0-build-8a0317f-20251214165542
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/dist/server-standalone.js +313 -207
- package/dist/server.js +580 -309
- package/dist/widget.js +11 -11
- package/package.json +3 -3
package/dist/server.js
CHANGED
|
@@ -75470,7 +75470,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
75470
75470
|
exports.useTransition = function() {
|
|
75471
75471
|
return resolveDispatcher().useTransition();
|
|
75472
75472
|
};
|
|
75473
|
-
exports.version = "19.2.
|
|
75473
|
+
exports.version = "19.2.3";
|
|
75474
75474
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
75475
75475
|
})();
|
|
75476
75476
|
});
|
|
@@ -75880,7 +75880,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
75880
75880
|
exports.useFormStatus = function() {
|
|
75881
75881
|
return resolveDispatcher().useHostTransitionStatus();
|
|
75882
75882
|
};
|
|
75883
|
-
exports.version = "19.2.
|
|
75883
|
+
exports.version = "19.2.3";
|
|
75884
75884
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
75885
75885
|
})();
|
|
75886
75886
|
});
|
|
@@ -81547,7 +81547,7 @@ $RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))
|
|
|
81547
81547
|
exports.renderToString = function(children, options) {
|
|
81548
81548
|
return renderToStringImpl(children, options, false, 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server');
|
|
81549
81549
|
};
|
|
81550
|
-
exports.version = "19.2.
|
|
81550
|
+
exports.version = "19.2.3";
|
|
81551
81551
|
})();
|
|
81552
81552
|
});
|
|
81553
81553
|
var require_react_dom_server_node_development = __commonJS22((exports) => {
|
|
@@ -86258,10 +86258,10 @@ Check the top-level render call using <` + componentName + ">.");
|
|
|
86258
86258
|
}
|
|
86259
86259
|
function ensureCorrectIsomorphicReactVersion() {
|
|
86260
86260
|
var isomorphicReactPackageVersion = React.version;
|
|
86261
|
-
if (isomorphicReactPackageVersion !== "19.2.
|
|
86261
|
+
if (isomorphicReactPackageVersion !== "19.2.3")
|
|
86262
86262
|
throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
86263
86263
|
- react: ` + (isomorphicReactPackageVersion + `
|
|
86264
|
-
- react-dom: 19.2.
|
|
86264
|
+
- react-dom: 19.2.3
|
|
86265
86265
|
Learn more: https://react.dev/warnings/version-mismatch`));
|
|
86266
86266
|
}
|
|
86267
86267
|
function createDrainHandler(destination, request) {
|
|
@@ -87596,7 +87596,7 @@ $RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))
|
|
|
87596
87596
|
}
|
|
87597
87597
|
};
|
|
87598
87598
|
};
|
|
87599
|
-
exports.version = "19.2.
|
|
87599
|
+
exports.version = "19.2.3";
|
|
87600
87600
|
})();
|
|
87601
87601
|
});
|
|
87602
87602
|
var exports_abap2 = {};
|
|
@@ -168113,23 +168113,23 @@ var ke2 = "a1ud1m37";
|
|
|
168113
168113
|
var xe2 = "a1fjyrqx";
|
|
168114
168114
|
var we2 = "a12sxrry";
|
|
168115
168115
|
var Ne2 = "a1hrqzjh";
|
|
168116
|
-
var
|
|
168117
|
-
var
|
|
168116
|
+
var Se2 = "a1ofrsp8";
|
|
168117
|
+
var je2 = "amjvvs5";
|
|
168118
168118
|
var Ce2 = "a9u79h5";
|
|
168119
168119
|
var _e2 = "a16o3qrr";
|
|
168120
168120
|
var Pe2 = "a1ln4qwr";
|
|
168121
168121
|
function Oe2(e488) {
|
|
168122
168122
|
var t481, r325 = e488.properties;
|
|
168123
168123
|
return import_react5.default.createElement("ul", { className: fe2 }, (t481 = qe2(r325)) === null || t481 === undefined ? undefined : t481.map(function(e489, t482) {
|
|
168124
|
-
var r326, a443 = e489.name, o237 = e489.type, i314 =
|
|
168125
|
-
return import_react5.default.createElement("atlas-apiref-prop", { className: he2, key: t482 }, a443 || o237 ? import_react5.default.createElement("dl", { className: ye2 }, import_react5.default.createElement(Re2, { property: e489, meta: e489.meta || [] }), import_react5.default.createElement(
|
|
168124
|
+
var r326, a443 = e489.name, o237 = e489.type, i314 = ze2(e489), l52 = ((r326 = e489.ofProperty) === null || r326 === undefined ? undefined : r326.description) || e489.description || "", c105 = Ue2(e489.meta);
|
|
168125
|
+
return import_react5.default.createElement("atlas-apiref-prop", { className: he2, key: t482 }, a443 || o237 ? import_react5.default.createElement("dl", { className: ye2 }, import_react5.default.createElement(Re2, { property: e489, meta: e489.meta || [] }), import_react5.default.createElement(Be2, { property: e489 }), import_react5.default.createElement(Le2, { metas: e489.meta || [] })) : null, l52 || c105 ? import_react5.default.createElement("atlas-apiref-propdescription", { className: ge2 }, import_react5.default.createElement(import_react5.default.Fragment, null, import_react5.default.createElement("div", null, l52), import_react5.default.createElement("div", null, Ue2(e489.meta)))) : null, (i314 == null ? undefined : i314.length) > 0 ? import_react5.default.createElement(Te2, { parent: e489, properties: i314 }) : null);
|
|
168126
168126
|
}));
|
|
168127
168127
|
}
|
|
168128
168128
|
function Re2(e488) {
|
|
168129
168129
|
var t481 = e488.property.name;
|
|
168130
168130
|
return t481 ? import_react5.default.createElement("atlas-apiref-propname", null, import_react5.default.createElement("dd", null, import_react5.default.createElement("code", { "data-parent-choice-type": e488.parentChoiceType ? "true" : undefined, className: Ee2 }, t481))) : null;
|
|
168131
168131
|
}
|
|
168132
|
-
function
|
|
168132
|
+
function Be2(e488) {
|
|
168133
168133
|
var t481 = e488.property, r325 = import_react5.useContext(ne2).Link, o237 = r325 === undefined ? "a" : r325, i314 = function(e489) {
|
|
168134
168134
|
var n470, t482, r326 = function() {
|
|
168135
168135
|
var e490 = import_react5.useContext(ne2);
|
|
@@ -168147,7 +168147,7 @@ function Ae2(e488) {
|
|
|
168147
168147
|
}(t481), l52 = Ie2(t481);
|
|
168148
168148
|
return l52 ? (i314 && (l52 = import_react5.default.createElement(o237, { className: ke2, href: i314 }, l52)), import_react5.default.createElement("atlas-apiref-proptype", null, import_react5.default.createElement("dd", null, import_react5.default.createElement("code", { className: be2 }, l52)))) : null;
|
|
168149
168149
|
}
|
|
168150
|
-
function
|
|
168150
|
+
function Ae2(e488) {
|
|
168151
168151
|
var t481 = e488.value;
|
|
168152
168152
|
switch (e488.name) {
|
|
168153
168153
|
case "required":
|
|
@@ -168177,11 +168177,11 @@ function Le2(e488) {
|
|
|
168177
168177
|
return ((t482 = r325[e489.name]) !== null && t482 !== undefined ? t482 : 3) - ((a444 = r325[n470.name]) !== null && a444 !== undefined ? a444 : 3);
|
|
168178
168178
|
});
|
|
168179
168179
|
return import_react5.default.createElement(import_react5.default.Fragment, null, a443.map(function(e489, t482) {
|
|
168180
|
-
return import_react5.default.createElement(
|
|
168180
|
+
return import_react5.default.createElement(Ae2, v2({ key: t482 }, e489));
|
|
168181
168181
|
}));
|
|
168182
168182
|
}
|
|
168183
168183
|
function Te2(e488) {
|
|
168184
|
-
var r325, a443 = e488.parent, o237 = e488.properties, i314 = import_react5.useState(false), l52 = S2(i314, 2), c105 = l52[0], u28 = l52[1], s187 = qe2(o237 || []), m82 =
|
|
168184
|
+
var r325, a443 = e488.parent, o237 = e488.properties, i314 = import_react5.useState(false), l52 = S2(i314, 2), c105 = l52[0], u28 = l52[1], s187 = qe2(o237 || []), m82 = Me2(a443), v4 = function() {
|
|
168185
168185
|
var e489;
|
|
168186
168186
|
return ((a443 == null ? undefined : a443.type) !== DEFINED_DEFINITION_PROPERTY_TYPE.ARRAY || ((e489 = a443 == null ? undefined : a443.ofProperty) === null || e489 === undefined ? undefined : e489.type) !== DEFINED_DEFINITION_PROPERTY_TYPE.ENUM) && (a443 == null ? undefined : a443.type) !== DEFINED_DEFINITION_PROPERTY_TYPE.ENUM && s187.every(function(e490) {
|
|
168187
168187
|
var n470, t481;
|
|
@@ -168195,22 +168195,22 @@ function Te2(e488) {
|
|
|
168195
168195
|
});
|
|
168196
168196
|
return import_react5.default.createElement(import_react5.default.Fragment, null, (s187 == null ? undefined : s187.length) ? import_react5.default.createElement(Fe2, { choiceType: m82, isArgument: p28, onClick: function() {
|
|
168197
168197
|
return u28(!c105);
|
|
168198
|
-
}, isExpanded: c105 }) : null, import_react5.default.createElement("div", { className: "".concat(xe2, " ").concat(c105 && we2) }, import_react5.default.createElement("div", { className: Ne2 }, import_react5.default.createElement("ul", { role: "list", className:
|
|
168199
|
-
var r326, a444 = e489.name, o238 = e489.type, i315 =
|
|
168200
|
-
return import_react5.default.createElement("atlas-apiref-prop", { className:
|
|
168198
|
+
}, isExpanded: c105 }) : null, import_react5.default.createElement("div", { className: "".concat(xe2, " ").concat(c105 && we2) }, import_react5.default.createElement("div", { className: Ne2 }, import_react5.default.createElement("ul", { role: "list", className: Se2 }, s187 == null ? undefined : s187.map(function(e489, t481) {
|
|
168199
|
+
var r326, a444 = e489.name, o238 = e489.type, i315 = ze2(e489), l53 = ((r326 = e489.ofProperty) === null || r326 === undefined ? undefined : r326.description) || e489.description || "", c106 = Ue2(e489.meta);
|
|
168200
|
+
return import_react5.default.createElement("atlas-apiref-prop", { className: je2, key: t481 }, a444 || o238 ? import_react5.default.createElement("dl", { className: ye2 }, import_react5.default.createElement(Re2, { property: e489, meta: e489.meta || [], parentChoiceType: m82 || !!p28 }), import_react5.default.createElement(Be2, { property: e489 }), import_react5.default.createElement(Le2, { metas: e489.meta || [] })) : null, l53 || c106 ? import_react5.default.createElement("atlas-apiref-propdescription", { className: ge2 }, import_react5.default.createElement(import_react5.default.Fragment, null, import_react5.default.createElement("div", null, l53), import_react5.default.createElement("div", null, Ue2(e489.meta)))) : null, (i315 == null ? undefined : i315.length) ? import_react5.default.createElement(Te2, { parent: e489, properties: i315 }) : null);
|
|
168201
168201
|
})))));
|
|
168202
168202
|
}
|
|
168203
168203
|
function Fe2(e488) {
|
|
168204
168204
|
var t481 = e488.isExpanded ? "Hide properties" : "Show properties";
|
|
168205
168205
|
return e488.choiceType ? t481 = e488.isExpanded ? "Hide possible types" : "Show possible types" : e488.isArgument && (t481 = e488.isExpanded ? "Hide possible arguments" : "Show possible arguments"), import_react5.default.createElement("button", { "aria-expanded": e488.isExpanded, "aria-controls": "chat/object-usage_table", onClick: e488.onClick, className: Ce2 }, import_react5.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "currentColor", viewBox: "0 0 24 24" }, import_react5.default.createElement("path", { fillRule: "evenodd", d: e488.isExpanded ? "M12 8a1 1 0 0 1 .707.293l7 7a1 1 0 0 1-1.414 1.414L12 10.414l-6.293 6.293a1 1 0 0 1-1.414-1.414l7-7A1 1 0 0 1 12 8Z" : "M4.293 8.293a1 1 0 0 1 1.414 0L12 14.586l6.293-6.293a1 1 0 1 1 1.414 1.414l-7 7a1 1 0 0 1-1.414 0l-7-7a1 1 0 0 1 0-1.414Z", clipRule: "evenodd" })), import_react5.default.createElement("span", { className: _e2 }, t481));
|
|
168206
168206
|
}
|
|
168207
|
-
function
|
|
168207
|
+
function Me2(e488) {
|
|
168208
168208
|
var n470;
|
|
168209
|
-
return e488.type === DEFINED_DEFINITION_PROPERTY_TYPE.ARRAY && ((n470 = e488.ofProperty) === null || n470 === undefined ? undefined : n470.type) === DEFINED_DEFINITION_PROPERTY_TYPE.ENUM || (e488.ofProperty ?
|
|
168209
|
+
return e488.type === DEFINED_DEFINITION_PROPERTY_TYPE.ARRAY && ((n470 = e488.ofProperty) === null || n470 === undefined ? undefined : n470.type) === DEFINED_DEFINITION_PROPERTY_TYPE.ENUM || (e488.ofProperty ? Me2(e488.ofProperty) : [DEFINED_DEFINITION_PROPERTY_TYPE.UNION, DEFINED_DEFINITION_PROPERTY_TYPE.XOR, DEFINED_DEFINITION_PROPERTY_TYPE.ENUM].includes(e488.type));
|
|
168210
168210
|
}
|
|
168211
|
-
function
|
|
168211
|
+
function ze2(e488) {
|
|
168212
168212
|
var n470;
|
|
168213
|
-
return ((n470 = e488.properties) === null || n470 === undefined ? undefined : n470.length) ? e488.properties : e488.ofProperty ?
|
|
168213
|
+
return ((n470 = e488.properties) === null || n470 === undefined ? undefined : n470.length) ? e488.properties : e488.ofProperty ? ze2(e488.ofProperty) : [];
|
|
168214
168214
|
}
|
|
168215
168215
|
function qe2(e488) {
|
|
168216
168216
|
return e488.filter(function(e489) {
|
|
@@ -168263,26 +168263,26 @@ function Ie2(e488) {
|
|
|
168263
168263
|
switch (n471.type) {
|
|
168264
168264
|
case (DEFINED_DEFINITION_PROPERTY_TYPE.UNION, DEFINED_DEFINITION_PROPERTY_TYPE.XOR):
|
|
168265
168265
|
if ((u28 = n471.properties) === null || u28 === undefined ? undefined : u28.length) {
|
|
168266
|
-
var x4, w4 = {}, N6 = [],
|
|
168266
|
+
var x4, w4 = {}, N6 = [], S4 = m41(n471.properties);
|
|
168267
168267
|
try {
|
|
168268
|
-
for (
|
|
168269
|
-
var
|
|
168270
|
-
C4.ofProperty && _8.length > 1 && (_8 = [[_8[0]].concat(k2(_8.slice(1, _8.length))).join("")]), (
|
|
168268
|
+
for (S4.s();!(x4 = S4.n()).done; ) {
|
|
168269
|
+
var j4, C4 = x4.value, _8 = e(C4);
|
|
168270
|
+
C4.ofProperty && _8.length > 1 && (_8 = [[_8[0]].concat(k2(_8.slice(1, _8.length))).join("")]), (j4 = N6).push.apply(j4, k2(_8));
|
|
168271
168271
|
}
|
|
168272
168272
|
} catch (e489) {
|
|
168273
|
-
|
|
168273
|
+
S4.e(e489);
|
|
168274
168274
|
} finally {
|
|
168275
|
-
|
|
168275
|
+
S4.f();
|
|
168276
168276
|
}
|
|
168277
168277
|
var P4, O4 = false, R8 = m41(N6);
|
|
168278
168278
|
try {
|
|
168279
168279
|
for (R8.s();!(P4 = R8.n()).done; ) {
|
|
168280
|
-
var
|
|
168281
|
-
if (
|
|
168280
|
+
var B4 = P4.value;
|
|
168281
|
+
if (B4.trim() === "or") {
|
|
168282
168282
|
O4 = true;
|
|
168283
168283
|
break;
|
|
168284
168284
|
}
|
|
168285
|
-
w4[
|
|
168285
|
+
w4[B4] = true;
|
|
168286
168286
|
}
|
|
168287
168287
|
} catch (e489) {
|
|
168288
168288
|
R8.e(e489);
|
|
@@ -168494,7 +168494,7 @@ var vn = (un || (un = 1, sn.exports = (cn || (cn = 1, function() {
|
|
|
168494
168494
|
if (n470 == null)
|
|
168495
168495
|
return null;
|
|
168496
168496
|
if (typeof n470 == "function")
|
|
168497
|
-
return n470.$$typeof ===
|
|
168497
|
+
return n470.$$typeof === j4 ? null : n470.displayName || n470.name || null;
|
|
168498
168498
|
if (typeof n470 == "string")
|
|
168499
168499
|
return n470;
|
|
168500
168500
|
switch (n470) {
|
|
@@ -168508,7 +168508,7 @@ var vn = (un || (un = 1, sn.exports = (cn || (cn = 1, function() {
|
|
|
168508
168508
|
return "Suspense";
|
|
168509
168509
|
case x4:
|
|
168510
168510
|
return "SuspenseList";
|
|
168511
|
-
case
|
|
168511
|
+
case S4:
|
|
168512
168512
|
return "Activity";
|
|
168513
168513
|
}
|
|
168514
168514
|
if (X3(n470) === "object")
|
|
@@ -168618,17 +168618,17 @@ React keys must be passed directly to JSX without using spread:
|
|
|
168618
168618
|
function u28(e489) {
|
|
168619
168619
|
return X3(e489) === "object" && e489 !== null && e489.$$typeof === m82;
|
|
168620
168620
|
}
|
|
168621
|
-
var s187, d29 = import_react5.default, m82 = Symbol.for("react.transitional.element"), v4 = Symbol.for("react.portal"), p28 = Symbol.for("react.fragment"), f4 = Symbol.for("react.strict_mode"), h6 = Symbol.for("react.profiler"), g6 = Symbol.for("react.consumer"), y4 = Symbol.for("react.context"), E8 = Symbol.for("react.forward_ref"), k4 = Symbol.for("react.suspense"), x4 = Symbol.for("react.suspense_list"), w4 = Symbol.for("react.memo"), N6 = Symbol.for("react.lazy"),
|
|
168621
|
+
var s187, d29 = import_react5.default, m82 = Symbol.for("react.transitional.element"), v4 = Symbol.for("react.portal"), p28 = Symbol.for("react.fragment"), f4 = Symbol.for("react.strict_mode"), h6 = Symbol.for("react.profiler"), g6 = Symbol.for("react.consumer"), y4 = Symbol.for("react.context"), E8 = Symbol.for("react.forward_ref"), k4 = Symbol.for("react.suspense"), x4 = Symbol.for("react.suspense_list"), w4 = Symbol.for("react.memo"), N6 = Symbol.for("react.lazy"), S4 = Symbol.for("react.activity"), j4 = Symbol.for("react.client.reference"), C4 = d29.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, _8 = Object.prototype.hasOwnProperty, P4 = Array.isArray, O4 = console.createTask ? console.createTask : function() {
|
|
168622
168622
|
return null;
|
|
168623
|
-
}, R8 = {},
|
|
168623
|
+
}, R8 = {}, B4 = (d29 = { react_stack_bottom_frame: function(e489) {
|
|
168624
168624
|
return e489();
|
|
168625
|
-
} }).react_stack_bottom_frame.bind(d29, o237)(),
|
|
168625
|
+
} }).react_stack_bottom_frame.bind(d29, o237)(), A8 = O4(a443(o237)), L4 = {};
|
|
168626
168626
|
mn.Fragment = p28, mn.jsx = function(e489, n470, t482) {
|
|
168627
168627
|
var r326 = 1e4 > C4.recentlyCreatedOwnerStacks++;
|
|
168628
|
-
return l52(e489, n470, t482, false, r326 ? Error("react-stack-top-frame") :
|
|
168628
|
+
return l52(e489, n470, t482, false, r326 ? Error("react-stack-top-frame") : B4, r326 ? O4(a443(e489)) : A8);
|
|
168629
168629
|
}, mn.jsxs = function(e489, n470, t482) {
|
|
168630
168630
|
var r326 = 1e4 > C4.recentlyCreatedOwnerStacks++;
|
|
168631
|
-
return l52(e489, n470, t482, true, r326 ? Error("react-stack-top-frame") :
|
|
168631
|
+
return l52(e489, n470, t482, true, r326 ? Error("react-stack-top-frame") : B4, r326 ? O4(a443(e489)) : A8);
|
|
168632
168632
|
};
|
|
168633
168633
|
}()), mn)), sn.exports);
|
|
168634
168634
|
function pn(e488, n470, t481) {
|
|
@@ -168673,7 +168673,7 @@ var kn = ["lineNumber", "totalLines", "indentation", "data", "annotation"];
|
|
|
168673
168673
|
var xn = ["merge"];
|
|
168674
168674
|
var wn = ["_stack"];
|
|
168675
168675
|
var Nn = ["value", "data"];
|
|
168676
|
-
var
|
|
168676
|
+
var Sn = function(e488) {
|
|
168677
168677
|
var n470 = fn(e488.merge, H2(e488, hn)), t481 = n470._stack, r325 = H2(n470, gn), a443 = G2(t481), o237 = a443[0], i314 = N3(a443).slice(1);
|
|
168678
168678
|
if (o237)
|
|
168679
168679
|
return vn.jsx(o237, B2({ _stack: i314 }, r325));
|
|
@@ -168682,7 +168682,7 @@ var jn = function(e488) {
|
|
|
168682
168682
|
var c105 = r325.children, u28 = H2(r325, yn);
|
|
168683
168683
|
return vn.jsx("pre", B2(B2({}, u28), {}, { ref: l52, "data-ch": true, children: vn.jsx("div", { style: { minWidth: "fit-content" }, children: c105 }) }));
|
|
168684
168684
|
};
|
|
168685
|
-
var
|
|
168685
|
+
var jn = function(e488) {
|
|
168686
168686
|
var n470 = fn(e488.merge, H2(e488, En)), t481 = n470._stack, r325 = H2(n470, bn), a443 = G2(t481), o237 = a443[0], i314 = N3(a443).slice(1);
|
|
168687
168687
|
if (o237) {
|
|
168688
168688
|
var { Component: l52, annotation: c105 } = o237;
|
|
@@ -168705,7 +168705,7 @@ var Cn = function(e488) {
|
|
|
168705
168705
|
};
|
|
168706
168706
|
var _n = function(e488) {
|
|
168707
168707
|
var n470 = import_react5.useRef(null), t481 = e488._ref || n470;
|
|
168708
|
-
return vn.jsx(
|
|
168708
|
+
return vn.jsx(Sn, { merge: e488, _ref: t481 });
|
|
168709
168709
|
};
|
|
168710
168710
|
function Pn(e488, n470) {
|
|
168711
168711
|
var t481 = [n470.fromColumn, n470.toColumn], r325 = On(e488, t481[0]);
|
|
@@ -168741,13 +168741,13 @@ function On(e488, n470) {
|
|
|
168741
168741
|
function Rn(e488) {
|
|
168742
168742
|
return e488.content !== undefined;
|
|
168743
168743
|
}
|
|
168744
|
-
function
|
|
168744
|
+
function Bn(e488) {
|
|
168745
168745
|
var { content: n470, handlers: t481, annotationStack: r325 } = e488;
|
|
168746
168746
|
return n470.map(function(e489, n471) {
|
|
168747
|
-
return Rn(e489) ? vn.jsx(Ln, { annotationStack: r325, handlers: t481, group: e489 }, n471) : e489.style ? vn.jsx(
|
|
168747
|
+
return Rn(e489) ? vn.jsx(Ln, { annotationStack: r325, handlers: t481, group: e489 }, n471) : e489.style ? vn.jsx(An, { annotationStack: r325, handlers: t481, token: e489 }, n471) : e489.value;
|
|
168748
168748
|
});
|
|
168749
168749
|
}
|
|
168750
|
-
function
|
|
168750
|
+
function An(e488) {
|
|
168751
168751
|
var { handlers: n470, token: t481 } = e488, r325 = function(e489, n471) {
|
|
168752
168752
|
var t482 = [];
|
|
168753
168753
|
return e489.forEach(function(e490) {
|
|
@@ -168764,7 +168764,7 @@ function Bn(e488) {
|
|
|
168764
168764
|
return vn.jsx(Cn, { merge: { _stack: r325, style: t481.style, value: t481.value } });
|
|
168765
168765
|
}
|
|
168766
168766
|
function Ln(e488) {
|
|
168767
|
-
var n470, t481 = e488.group, r325 = e488.handlers, a443 = e488.annotationStack, o237 = t481.annotation, i314 = t481.content, l52 = o237.name, c105 =
|
|
168767
|
+
var n470, t481 = e488.group, r325 = e488.handlers, a443 = e488.annotationStack, o237 = t481.annotation, i314 = t481.content, l52 = o237.name, c105 = Bn({ content: i314, handlers: r325, annotationStack: [].concat(z2(a443), [o237]) }), u28 = (n470 = r325.find(function(e489) {
|
|
168768
168768
|
return e489.name === l52;
|
|
168769
168769
|
})) === null || n470 === undefined ? undefined : n470.Inline;
|
|
168770
168770
|
return u28 ? vn.jsx(u28, { annotation: o237, children: c105 }) : c105;
|
|
@@ -168779,7 +168779,7 @@ function Tn(e488, n470) {
|
|
|
168779
168779
|
}
|
|
168780
168780
|
function Fn(e488, n470) {
|
|
168781
168781
|
var t481 = e488.findIndex(function(e489) {
|
|
168782
|
-
return
|
|
168782
|
+
return Mn(e489) && e489.range[0] < n470 && n470 <= e489.range[1];
|
|
168783
168783
|
});
|
|
168784
168784
|
if (t481 === -1)
|
|
168785
168785
|
return e488;
|
|
@@ -168788,13 +168788,13 @@ function Fn(e488, n470) {
|
|
|
168788
168788
|
e489.range[1] < n470 ? o237.push(e489) : i314.push(e489);
|
|
168789
168789
|
}), [].concat(z2(e488.slice(0, t481)), [B2(B2({}, r325), {}, { lines: o237, range: [r325.range[0], n470 - 1] }), B2(B2({}, r325), {}, { lines: i314, range: [n470, r325.range[1]] })], z2(e488.slice(t481 + 1)));
|
|
168790
168790
|
}
|
|
168791
|
-
function
|
|
168791
|
+
function Mn(e488) {
|
|
168792
168792
|
return e488.annotation !== undefined;
|
|
168793
168793
|
}
|
|
168794
|
-
function
|
|
168794
|
+
function zn(e488) {
|
|
168795
168795
|
var { linesOrGroups: n470, handlers: t481, inlineAnnotations: r325, annotationStack: a443 } = e488, o237 = a443 === undefined ? [] : a443;
|
|
168796
168796
|
return n470.map(function(e489) {
|
|
168797
|
-
return
|
|
168797
|
+
return Mn(e489) ? vn.jsx(In, { group: e489, handlers: t481, inlineAnnotations: r325, annotationStack: o237 }, e489.range[0]) : vn.jsx(qn, { line: e489, handlers: t481, inlineAnnotations: r325, annotationStack: o237 }, e489.lineNumber);
|
|
168798
168798
|
});
|
|
168799
168799
|
}
|
|
168800
168800
|
function qn(e488) {
|
|
@@ -168816,13 +168816,13 @@ function qn(e488) {
|
|
|
168816
168816
|
t482.push({ Component: a444, annotation: e491 });
|
|
168817
168817
|
}));
|
|
168818
168818
|
}), t482;
|
|
168819
|
-
}(t481, o237), m82 =
|
|
168820
|
-
return vn.jsx(
|
|
168819
|
+
}(t481, o237), m82 = Bn({ content: s187, handlers: t481, annotationStack: o237 }), v4 = { lineNumber: i314, indentation: c105, totalLines: l52, _stack: d29 };
|
|
168820
|
+
return vn.jsx(jn, { merge: v4, children: m82 }, i314);
|
|
168821
168821
|
}
|
|
168822
168822
|
function In(e488) {
|
|
168823
168823
|
var n470, t481 = e488.group, r325 = e488.handlers, a443 = e488.inlineAnnotations, o237 = e488.annotationStack, i314 = t481.annotation, l52 = t481.lines, c105 = i314.name, u28 = (n470 = r325.find(function(e489) {
|
|
168824
168824
|
return e489.name === c105;
|
|
168825
|
-
})) === null || n470 === undefined ? undefined : n470.Block, s187 =
|
|
168825
|
+
})) === null || n470 === undefined ? undefined : n470.Block, s187 = zn({ linesOrGroups: l52, handlers: r325, inlineAnnotations: a443, annotationStack: [].concat(z2(o237), [i314]) });
|
|
168826
168826
|
return u28 ? vn.jsx(u28, { annotation: i314, children: s187 }) : s187;
|
|
168827
168827
|
}
|
|
168828
168828
|
var Hn = ["code", "handlers"];
|
|
@@ -168849,7 +168849,7 @@ var $n = import_react5.forwardRef(function(e488, n470) {
|
|
|
168849
168849
|
}).filter(Boolean);
|
|
168850
168850
|
return t482.length > 0 && t482.unshift(_n), [].concat(z2(n471), z2(t482));
|
|
168851
168851
|
}(d29), v4 = { _stack: m82, _ref: n470 };
|
|
168852
|
-
return vn.jsx(
|
|
168852
|
+
return vn.jsx(Sn, B2(B2({ merge: v4, "data-theme": l52, "data-lang": c105 }, o237), {}, { children: vn.jsx(Un, { tokens: i314, handlers: d29, annotations: u28 }) }));
|
|
168853
168853
|
});
|
|
168854
168854
|
function Un(e488) {
|
|
168855
168855
|
var { tokens: n470, handlers: t481, annotations: r325 } = e488, a443 = function(e489) {
|
|
@@ -168880,7 +168880,7 @@ function Un(e488) {
|
|
|
168880
168880
|
t482 = Tn(t482, n471[r326]);
|
|
168881
168881
|
return t482;
|
|
168882
168882
|
}(a443, o237);
|
|
168883
|
-
return
|
|
168883
|
+
return zn({ linesOrGroups: l52, handlers: t481, inlineAnnotations: i314 });
|
|
168884
168884
|
}
|
|
168885
168885
|
function Dn(e488) {
|
|
168886
168886
|
var t481 = e488.size, r325 = t481 === undefined ? "medium" : t481, a443 = e488.className;
|
|
@@ -169018,10 +169018,10 @@ function et2() {
|
|
|
169018
169018
|
return import_react5.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", strokeWidth: 3, stroke: "currentColor", fill: "none", width: 16, strokeLinecap: "round", strokeLinejoin: "round" }, import_react5.default.createElement("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), import_react5.default.createElement("path", { d: "M12 12l8 -4.5" }), import_react5.default.createElement("path", { d: "M12 12v9" }), import_react5.default.createElement("path", { d: "M12 12l-8 -4.5" }), import_react5.default.createElement("path", { d: "M12 12l8 4.5" }), import_react5.default.createElement("path", { d: "M12 3v9" }), import_react5.default.createElement("path", { d: "M12 12l-8 4.5" }));
|
|
169019
169019
|
}
|
|
169020
169020
|
Qn.LineNumber = function(e488) {
|
|
169021
|
-
return e488.children && e488.children.length ? import_react5.default.createElement("xyd-code-linenumber", { className: "lyawwu4", style: { minWidth: "".concat(e488.width, "ch") } }, import_react5.default.createElement("span", { part: "line-number" }, e488.lineNumber), import_react5.default.createElement(
|
|
169021
|
+
return e488.children && e488.children.length ? import_react5.default.createElement("xyd-code-linenumber", { className: "lyawwu4", style: { minWidth: "".concat(e488.width, "ch") } }, import_react5.default.createElement("span", { part: "line-number" }, e488.lineNumber), import_react5.default.createElement(jn, { merge: e488 })) : null;
|
|
169022
169022
|
}, Qn.Mark = function(e488) {
|
|
169023
169023
|
var t481, r325, a443, o237;
|
|
169024
|
-
return import_react5.default.createElement("xyd-code-mark", { "data-diff": (t481 = e488.annotation) !== null && t481 !== undefined && t481.diff ? "true" : undefined, "data-query": (r325 = e488.annotation) !== null && r325 !== undefined && r325.diff && (a443 = e488.annotation) !== null && a443 !== undefined && a443.query ? (o237 = e488.annotation) === null || o237 === undefined ? undefined : o237.query : undefined, "data-annotated": String(!!e488.annotation), className: "m1i5ism5" }, import_react5.default.createElement(
|
|
169024
|
+
return import_react5.default.createElement("xyd-code-mark", { "data-diff": (t481 = e488.annotation) !== null && t481 !== undefined && t481.diff ? "true" : undefined, "data-query": (r325 = e488.annotation) !== null && r325 !== undefined && r325.diff && (a443 = e488.annotation) !== null && a443 !== undefined && a443.query ? (o237 = e488.annotation) === null || o237 === undefined ? undefined : o237.query : undefined, "data-annotated": String(!!e488.annotation), className: "m1i5ism5" }, import_react5.default.createElement(jn, { part: "line", merge: e488 }));
|
|
169025
169025
|
}, Qn.MarkInline = function(e488) {
|
|
169026
169026
|
var t481, r325, a443, o237;
|
|
169027
169027
|
return import_react5.default.createElement("xyd-code-mark-inline", { "data-diff": (t481 = e488.annotation) !== null && t481 !== undefined && t481.diff ? "true" : undefined, "data-query": (r325 = e488.annotation) !== null && r325 !== undefined && r325.diff && (a443 = e488.annotation) !== null && a443 !== undefined && a443.query ? (o237 = e488.annotation) === null || o237 === undefined ? undefined : o237.query : undefined, className: "m1fnx2sm" }, e488.children);
|
|
@@ -169051,7 +169051,7 @@ var nt2 = { mark: { name: "mark", Line: function(e488) {
|
|
|
169051
169051
|
return [e488, E4(E4({}, e488), {}, { name: "mark", query: e488.query, diff: true })];
|
|
169052
169052
|
}, Line: function(e488) {
|
|
169053
169053
|
var t481 = e488.annotation, r325 = w2(e488, We2);
|
|
169054
|
-
return import_react5.default.createElement(import_react5.default.Fragment, null, import_react5.default.createElement("div", null, t481 == null ? undefined : t481.query), import_react5.default.createElement(
|
|
169054
|
+
return import_react5.default.createElement(import_react5.default.Fragment, null, import_react5.default.createElement("div", null, t481 == null ? undefined : t481.query), import_react5.default.createElement(jn, { merge: r325 }));
|
|
169055
169055
|
} } };
|
|
169056
169056
|
function tt2(e488) {
|
|
169057
169057
|
var r325 = e488.text, a443 = import_react5.useState(false), o237 = S2(a443, 2), i314 = o237[0], l52 = o237[1], c105 = $t();
|
|
@@ -169178,10 +169178,10 @@ function wt2(e488) {
|
|
|
169178
169178
|
return { value: String(e489.code || ""), lang: String(e489.language || ""), meta: String(e489.context || ""), highlighted: e489.highlighted };
|
|
169179
169179
|
})) || [];
|
|
169180
169180
|
}
|
|
169181
|
-
var
|
|
169181
|
+
var jt2 = "a1cqu14j";
|
|
169182
169182
|
function Ct2(e488) {
|
|
169183
169183
|
var t481 = e488.children;
|
|
169184
|
-
return import_react5.default.createElement("atlas-decorator", { className:
|
|
169184
|
+
return import_react5.default.createElement("atlas-decorator", { className: jt2 }, t481);
|
|
169185
169185
|
}
|
|
169186
169186
|
function _t2(e488) {
|
|
169187
169187
|
var t481;
|
|
@@ -169212,8 +169212,8 @@ function Rt2(n470) {
|
|
|
169212
169212
|
}))));
|
|
169213
169213
|
}), e487.createElement("br", null));
|
|
169214
169214
|
}
|
|
169215
|
-
var
|
|
169216
|
-
function
|
|
169215
|
+
var Bt2 = { track: function() {} };
|
|
169216
|
+
function At2(e488) {
|
|
169217
169217
|
var t481;
|
|
169218
169218
|
t481 = e488.kind === "secondary" ? Ot2 : _t2;
|
|
169219
169219
|
var r325 = e488.references;
|
|
@@ -169224,7 +169224,7 @@ function Bt2(e488) {
|
|
|
169224
169224
|
console.error("Error parsing references", e489);
|
|
169225
169225
|
}
|
|
169226
169226
|
var a443 = e488.analytics ? UXAnalytics : import_react5.default.Fragment;
|
|
169227
|
-
return import_react5.default.createElement(a443, { analytics:
|
|
169227
|
+
return import_react5.default.createElement(a443, { analytics: Bt2 }, import_react5.default.createElement(Ct2, null, import_react5.default.createElement("div", { className: "a5edgc7" }, import_react5.default.createElement(t481, { references: r325, apiRefItemKind: e488.apiRefItemKind }))));
|
|
169228
169228
|
}
|
|
169229
169229
|
var jsx_dev_runtime = __toESM22(require_jsx_dev_runtime(), 1);
|
|
169230
169230
|
function References({
|
|
@@ -169236,7 +169236,7 @@ function References({
|
|
|
169236
169236
|
syntaxHighlight: null,
|
|
169237
169237
|
markdownFormat: true
|
|
169238
169238
|
},
|
|
169239
|
-
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(
|
|
169239
|
+
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(At2, {
|
|
169240
169240
|
kind: "primary",
|
|
169241
169241
|
references,
|
|
169242
169242
|
analytics: true
|
|
@@ -210608,7 +210608,7 @@ function convertToPrettyString(message) {
|
|
|
210608
210608
|
lines.push(` Call ID: ${tc.id}`);
|
|
210609
210609
|
lines.push(" Args:");
|
|
210610
210610
|
for (const [key, value] of Object.entries(tc.args))
|
|
210611
|
-
lines.push(` ${key}: ${value}`);
|
|
210611
|
+
lines.push(` ${key}: ${typeof value === "object" ? JSON.stringify(value) : value}`);
|
|
210612
210612
|
}
|
|
210613
210613
|
}
|
|
210614
210614
|
}
|
|
@@ -212548,7 +212548,7 @@ var BaseCallbackHandler = class extends BaseCallbackHandlerMethodsClass {
|
|
|
212548
212548
|
static fromMethods(methods) {
|
|
212549
212549
|
|
|
212550
212550
|
class Handler extends BaseCallbackHandler {
|
|
212551
|
-
name =
|
|
212551
|
+
name = v7();
|
|
212552
212552
|
constructor() {
|
|
212553
212553
|
super();
|
|
212554
212554
|
Object.assign(this, methods);
|
|
@@ -212637,7 +212637,7 @@ function uuid7FromTime(timestamp2) {
|
|
|
212637
212637
|
const msecs = typeof timestamp2 === "string" ? Date.parse(timestamp2) : timestamp2;
|
|
212638
212638
|
return v7({ msecs, seq: 0 });
|
|
212639
212639
|
}
|
|
212640
|
-
var __version__ = "0.3.
|
|
212640
|
+
var __version__ = "0.3.87";
|
|
212641
212641
|
var globalEnv;
|
|
212642
212642
|
var isBrowser2 = () => typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
212643
212643
|
var isWebWorker2 = () => typeof globalThis === "object" && globalThis.constructor && globalThis.constructor.name === "DedicatedWorkerGlobalScope";
|
|
@@ -213788,7 +213788,10 @@ function replaceGetterValues(replacer) {
|
|
|
213788
213788
|
return replacer.call(this, key, val);
|
|
213789
213789
|
};
|
|
213790
213790
|
}
|
|
213791
|
-
function mergeRuntimeEnvIntoRun(run, cachedEnvVars) {
|
|
213791
|
+
function mergeRuntimeEnvIntoRun(run, cachedEnvVars, omitTracedRuntimeInfo) {
|
|
213792
|
+
if (omitTracedRuntimeInfo) {
|
|
213793
|
+
return run;
|
|
213794
|
+
}
|
|
213792
213795
|
const runtimeEnv = getRuntimeEnvironment2();
|
|
213793
213796
|
const envVars = cachedEnvVars ?? getLangSmithEnvVarsMetadata();
|
|
213794
213797
|
const extra = run.extra ?? {};
|
|
@@ -214008,6 +214011,12 @@ class Client {
|
|
|
214008
214011
|
writable: true,
|
|
214009
214012
|
value: undefined
|
|
214010
214013
|
});
|
|
214014
|
+
Object.defineProperty(this, "omitTracedRuntimeInfo", {
|
|
214015
|
+
enumerable: true,
|
|
214016
|
+
configurable: true,
|
|
214017
|
+
writable: true,
|
|
214018
|
+
value: undefined
|
|
214019
|
+
});
|
|
214011
214020
|
Object.defineProperty(this, "tracingSampleRate", {
|
|
214012
214021
|
enumerable: true,
|
|
214013
214022
|
configurable: true,
|
|
@@ -214163,6 +214172,7 @@ class Client {
|
|
|
214163
214172
|
});
|
|
214164
214173
|
this.hideInputs = config2.hideInputs ?? config2.anonymizer ?? defaultConfig.hideInputs;
|
|
214165
214174
|
this.hideOutputs = config2.hideOutputs ?? config2.anonymizer ?? defaultConfig.hideOutputs;
|
|
214175
|
+
this.omitTracedRuntimeInfo = config2.omitTracedRuntimeInfo ?? false;
|
|
214166
214176
|
this.autoBatchTracing = config2.autoBatchTracing ?? this.autoBatchTracing;
|
|
214167
214177
|
this.autoBatchQueue = new AutoBatchQueue(maxMemory);
|
|
214168
214178
|
this.blockOnRootRunFinalization = config2.blockOnRootRunFinalization ?? this.blockOnRootRunFinalization;
|
|
@@ -214493,7 +214503,7 @@ class Client {
|
|
|
214493
214503
|
async processRunOperation(item) {
|
|
214494
214504
|
clearTimeout(this.autoBatchTimeout);
|
|
214495
214505
|
this.autoBatchTimeout = undefined;
|
|
214496
|
-
item.item = mergeRuntimeEnvIntoRun(item.item, this.cachedLSEnvVarsForMetadata);
|
|
214506
|
+
item.item = mergeRuntimeEnvIntoRun(item.item, this.cachedLSEnvVarsForMetadata, this.omitTracedRuntimeInfo);
|
|
214497
214507
|
const itemPromise = this.autoBatchQueue.push(item);
|
|
214498
214508
|
if (this.manualFlushMode) {
|
|
214499
214509
|
return itemPromise;
|
|
@@ -214608,7 +214618,7 @@ class Client {
|
|
|
214608
214618
|
}).catch(console.error);
|
|
214609
214619
|
return;
|
|
214610
214620
|
}
|
|
214611
|
-
const mergedRunCreateParam = mergeRuntimeEnvIntoRun(runCreate, this.cachedLSEnvVarsForMetadata);
|
|
214621
|
+
const mergedRunCreateParam = mergeRuntimeEnvIntoRun(runCreate, this.cachedLSEnvVarsForMetadata, this.omitTracedRuntimeInfo);
|
|
214612
214622
|
if (options?.apiKey !== undefined) {
|
|
214613
214623
|
headers["x-api-key"] = options.apiKey;
|
|
214614
214624
|
}
|
|
@@ -216096,6 +216106,39 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
216096
216106
|
return res;
|
|
216097
216107
|
});
|
|
216098
216108
|
}
|
|
216109
|
+
async deleteExamples(exampleIds, options) {
|
|
216110
|
+
exampleIds.forEach((id) => assertUuid(id));
|
|
216111
|
+
if (options?.hardDelete) {
|
|
216112
|
+
const path5 = this._getPlatformEndpointPath("datasets/examples/delete");
|
|
216113
|
+
await this.caller.call(async () => {
|
|
216114
|
+
const res = await this._fetch(`${this.apiUrl}${path5}`, {
|
|
216115
|
+
method: "POST",
|
|
216116
|
+
headers: { ...this.headers, "Content-Type": "application/json" },
|
|
216117
|
+
body: JSON.stringify({
|
|
216118
|
+
example_ids: exampleIds,
|
|
216119
|
+
hard_delete: true
|
|
216120
|
+
}),
|
|
216121
|
+
signal: AbortSignal.timeout(this.timeout_ms),
|
|
216122
|
+
...this.fetchOptions
|
|
216123
|
+
});
|
|
216124
|
+
await raiseForStatus(res, "hard delete examples", true);
|
|
216125
|
+
return res;
|
|
216126
|
+
});
|
|
216127
|
+
} else {
|
|
216128
|
+
const params2 = new URLSearchParams;
|
|
216129
|
+
exampleIds.forEach((id) => params2.append("example_ids", id));
|
|
216130
|
+
await this.caller.call(async () => {
|
|
216131
|
+
const res = await this._fetch(`${this.apiUrl}/examples?${params2.toString()}`, {
|
|
216132
|
+
method: "DELETE",
|
|
216133
|
+
headers: this.headers,
|
|
216134
|
+
signal: AbortSignal.timeout(this.timeout_ms),
|
|
216135
|
+
...this.fetchOptions
|
|
216136
|
+
});
|
|
216137
|
+
await raiseForStatus(res, "delete examples", true);
|
|
216138
|
+
return res;
|
|
216139
|
+
});
|
|
216140
|
+
}
|
|
216141
|
+
}
|
|
216099
216142
|
async updateExample(exampleIdOrUpdate, update) {
|
|
216100
216143
|
let exampleId;
|
|
216101
216144
|
if (update) {
|
|
@@ -217904,7 +217947,8 @@ function isCallbackManagerLike(x4) {
|
|
|
217904
217947
|
return typeof x4 === "object" && x4 != null && Array.isArray(x4.handlers);
|
|
217905
217948
|
}
|
|
217906
217949
|
function isRunnableConfigLike(x4) {
|
|
217907
|
-
|
|
217950
|
+
const callbacks = x4?.callbacks;
|
|
217951
|
+
return x4 != null && typeof callbacks === "object" && (containsLangChainTracerLike(callbacks?.handlers) || containsLangChainTracerLike(callbacks));
|
|
217908
217952
|
}
|
|
217909
217953
|
function _getWriteReplicasFromEnv() {
|
|
217910
217954
|
const envVar = getEnvironmentVariable2("LANGSMITH_RUNS_ENDPOINTS");
|
|
@@ -218044,7 +218088,7 @@ ${error2.stack}` : "");
|
|
|
218044
218088
|
const { dottedOrder: currentDottedOrder, microsecondPrecisionDatestring } = convertToDottedOrderFormat(new Date(run.start_time).getTime(), run.id, run.execution_order);
|
|
218045
218089
|
const storedRun = { ...run };
|
|
218046
218090
|
const parentRun = this.getRunById(storedRun.parent_run_id);
|
|
218047
|
-
if (storedRun.parent_run_id !== undefined)
|
|
218091
|
+
if (storedRun.parent_run_id !== undefined)
|
|
218048
218092
|
if (parentRun) {
|
|
218049
218093
|
this._addChildRun(parentRun, storedRun);
|
|
218050
218094
|
parentRun.child_execution_order = Math.max(parentRun.child_execution_order, storedRun.child_execution_order);
|
|
@@ -218053,8 +218097,9 @@ ${error2.stack}` : "");
|
|
|
218053
218097
|
storedRun.dotted_order = [parentRun.dotted_order, currentDottedOrder].join(".");
|
|
218054
218098
|
storedRun._serialized_start_time = microsecondPrecisionDatestring;
|
|
218055
218099
|
}
|
|
218056
|
-
}
|
|
218057
|
-
|
|
218100
|
+
} else
|
|
218101
|
+
storedRun.parent_run_id = undefined;
|
|
218102
|
+
else {
|
|
218058
218103
|
storedRun.trace_id = storedRun.id;
|
|
218059
218104
|
storedRun.dotted_order = currentDottedOrder;
|
|
218060
218105
|
storedRun._serialized_start_time = microsecondPrecisionDatestring;
|
|
@@ -218980,7 +219025,7 @@ var CallbackManager = class CallbackManager2 extends BaseCallbackManager {
|
|
|
218980
219025
|
}
|
|
218981
219026
|
async handleLLMStart(llm, prompts, runId = undefined, _parentRunId = undefined, extraParams = undefined, _tags = undefined, _metadata = undefined, runName = undefined) {
|
|
218982
219027
|
return Promise.all(prompts.map(async (prompt, idx) => {
|
|
218983
|
-
const runId_ = idx === 0 && runId ? runId :
|
|
219028
|
+
const runId_ = idx === 0 && runId ? runId : v7();
|
|
218984
219029
|
await Promise.all(this.handlers.map((handler) => {
|
|
218985
219030
|
if (handler.ignoreLLM)
|
|
218986
219031
|
return;
|
|
@@ -219002,7 +219047,7 @@ var CallbackManager = class CallbackManager2 extends BaseCallbackManager {
|
|
|
219002
219047
|
}
|
|
219003
219048
|
async handleChatModelStart(llm, messages, runId = undefined, _parentRunId = undefined, extraParams = undefined, _tags = undefined, _metadata = undefined, runName = undefined) {
|
|
219004
219049
|
return Promise.all(messages.map(async (messageGroup, idx) => {
|
|
219005
|
-
const runId_ = idx === 0 && runId ? runId :
|
|
219050
|
+
const runId_ = idx === 0 && runId ? runId : v7();
|
|
219006
219051
|
await Promise.all(this.handlers.map((handler) => {
|
|
219007
219052
|
if (handler.ignoreLLM)
|
|
219008
219053
|
return;
|
|
@@ -219027,7 +219072,7 @@ var CallbackManager = class CallbackManager2 extends BaseCallbackManager {
|
|
|
219027
219072
|
return new CallbackManagerForLLMRun(runId_, this.handlers, this.inheritableHandlers, this.tags, this.inheritableTags, this.metadata, this.inheritableMetadata, this._parentRunId);
|
|
219028
219073
|
}));
|
|
219029
219074
|
}
|
|
219030
|
-
async handleChainStart(chain, inputs, runId =
|
|
219075
|
+
async handleChainStart(chain, inputs, runId = v7(), runType = undefined, _tags = undefined, _metadata = undefined, runName = undefined) {
|
|
219031
219076
|
await Promise.all(this.handlers.map((handler) => {
|
|
219032
219077
|
if (handler.ignoreChain)
|
|
219033
219078
|
return;
|
|
@@ -219046,7 +219091,7 @@ var CallbackManager = class CallbackManager2 extends BaseCallbackManager {
|
|
|
219046
219091
|
}));
|
|
219047
219092
|
return new CallbackManagerForChainRun(runId, this.handlers, this.inheritableHandlers, this.tags, this.inheritableTags, this.metadata, this.inheritableMetadata, this._parentRunId);
|
|
219048
219093
|
}
|
|
219049
|
-
async handleToolStart(tool, input, runId =
|
|
219094
|
+
async handleToolStart(tool, input, runId = v7(), _parentRunId = undefined, _tags = undefined, _metadata = undefined, runName = undefined) {
|
|
219050
219095
|
await Promise.all(this.handlers.map((handler) => {
|
|
219051
219096
|
if (handler.ignoreAgent)
|
|
219052
219097
|
return;
|
|
@@ -219065,7 +219110,7 @@ var CallbackManager = class CallbackManager2 extends BaseCallbackManager {
|
|
|
219065
219110
|
}));
|
|
219066
219111
|
return new CallbackManagerForToolRun(runId, this.handlers, this.inheritableHandlers, this.tags, this.inheritableTags, this.metadata, this.inheritableMetadata, this._parentRunId);
|
|
219067
219112
|
}
|
|
219068
|
-
async handleRetrieverStart(retriever, query, runId =
|
|
219113
|
+
async handleRetrieverStart(retriever, query, runId = v7(), _parentRunId = undefined, _tags = undefined, _metadata = undefined, runName = undefined) {
|
|
219069
219114
|
await Promise.all(this.handlers.map((handler) => {
|
|
219070
219115
|
if (handler.ignoreRetriever)
|
|
219071
219116
|
return;
|
|
@@ -219163,7 +219208,7 @@ var CallbackManager = class CallbackManager2 extends BaseCallbackManager {
|
|
|
219163
219208
|
static fromHandlers(handlers) {
|
|
219164
219209
|
|
|
219165
219210
|
class Handler extends BaseCallbackHandler {
|
|
219166
|
-
name =
|
|
219211
|
+
name = v7();
|
|
219167
219212
|
constructor() {
|
|
219168
219213
|
super();
|
|
219169
219214
|
Object.assign(this, handlers);
|
|
@@ -219416,7 +219461,12 @@ function ensureConfig(config2) {
|
|
|
219416
219461
|
if (empty2.timeout !== undefined) {
|
|
219417
219462
|
if (empty2.timeout <= 0)
|
|
219418
219463
|
throw new Error("Timeout must be a positive number");
|
|
219419
|
-
const
|
|
219464
|
+
const originalTimeoutMs = empty2.timeout;
|
|
219465
|
+
const timeoutSignal = AbortSignal.timeout(originalTimeoutMs);
|
|
219466
|
+
if (!empty2.metadata)
|
|
219467
|
+
empty2.metadata = {};
|
|
219468
|
+
if (empty2.metadata.timeoutMs === undefined)
|
|
219469
|
+
empty2.metadata.timeoutMs = originalTimeoutMs;
|
|
219420
219470
|
if (empty2.signal !== undefined) {
|
|
219421
219471
|
if ("any" in AbortSignal)
|
|
219422
219472
|
empty2.signal = AbortSignal.any([empty2.signal, timeoutSignal]);
|
|
@@ -219794,12 +219844,19 @@ __export222(core_exports, {
|
|
|
219794
219844
|
});
|
|
219795
219845
|
var JsonPatchError = PatchError;
|
|
219796
219846
|
var deepClone = _deepClone;
|
|
219847
|
+
function isDangerousKey(key) {
|
|
219848
|
+
return Object.getOwnPropertyNames(Object.prototype).includes(key);
|
|
219849
|
+
}
|
|
219797
219850
|
var objOps = {
|
|
219798
219851
|
add: function(obj, key, document4) {
|
|
219852
|
+
if (isDangerousKey(key))
|
|
219853
|
+
throw new TypeError("JSON-Patch: modifying `__proto__`, `constructor`, or `prototype` prop is banned for security reasons");
|
|
219799
219854
|
obj[key] = this.value;
|
|
219800
219855
|
return { newDocument: document4 };
|
|
219801
219856
|
},
|
|
219802
219857
|
remove: function(obj, key, document4) {
|
|
219858
|
+
if (isDangerousKey(key))
|
|
219859
|
+
throw new TypeError("JSON-Patch: modifying `__proto__`, `constructor`, or `prototype` prop is banned for security reasons");
|
|
219803
219860
|
var removed = obj[key];
|
|
219804
219861
|
delete obj[key];
|
|
219805
219862
|
return {
|
|
@@ -219808,6 +219865,8 @@ var objOps = {
|
|
|
219808
219865
|
};
|
|
219809
219866
|
},
|
|
219810
219867
|
replace: function(obj, key, document4) {
|
|
219868
|
+
if (isDangerousKey(key))
|
|
219869
|
+
throw new TypeError("JSON-Patch: modifying `__proto__`, `constructor`, or `prototype` prop is banned for security reasons");
|
|
219811
219870
|
var removed = obj[key];
|
|
219812
219871
|
obj[key] = this.value;
|
|
219813
219872
|
return {
|
|
@@ -231206,7 +231265,7 @@ function interopZodTransformInputSchemaImpl(schema2, recursive, cache) {
|
|
|
231206
231265
|
outputSchema = interopZodTransformInputSchemaImpl(schema2._zod.def.in, recursive, cache);
|
|
231207
231266
|
if (recursive) {
|
|
231208
231267
|
if (isZodObjectV4(outputSchema)) {
|
|
231209
|
-
const outputShape =
|
|
231268
|
+
const outputShape = {};
|
|
231210
231269
|
for (const [key, keySchema] of Object.entries(outputSchema._zod.def.shape))
|
|
231211
231270
|
outputShape[key] = interopZodTransformInputSchemaImpl(keySchema, recursive, cache);
|
|
231212
231271
|
outputSchema = clone2(outputSchema, {
|
|
@@ -231329,16 +231388,24 @@ graph TD;
|
|
|
231329
231388
|
edgeGroups[commonPrefix].push(edge);
|
|
231330
231389
|
}
|
|
231331
231390
|
const seenSubgraphs = /* @__PURE__ */ new Set;
|
|
231391
|
+
function sortPrefixesByDepth(prefixes) {
|
|
231392
|
+
return [...prefixes].sort((a443, b8) => {
|
|
231393
|
+
return a443.split(":").length - b8.split(":").length;
|
|
231394
|
+
});
|
|
231395
|
+
}
|
|
231332
231396
|
function addSubgraph(edges$1, prefix) {
|
|
231333
231397
|
const selfLoop = edges$1.length === 1 && edges$1[0].source === edges$1[0].target;
|
|
231334
231398
|
if (prefix && !selfLoop) {
|
|
231335
231399
|
const subgraph = prefix.split(":").pop();
|
|
231336
|
-
if (seenSubgraphs.has(
|
|
231337
|
-
throw new Error(`Found duplicate subgraph '${subgraph}' -- this likely means that you're reusing a subgraph node with the same name. Please adjust your graph to have subgraph nodes with unique names.`);
|
|
231338
|
-
seenSubgraphs.add(
|
|
231400
|
+
if (seenSubgraphs.has(prefix))
|
|
231401
|
+
throw new Error(`Found duplicate subgraph '${subgraph}' at '${prefix} -- this likely means that you're reusing a subgraph node with the same name. Please adjust your graph to have subgraph nodes with unique names.`);
|
|
231402
|
+
seenSubgraphs.add(prefix);
|
|
231339
231403
|
mermaidGraph += ` subgraph ${subgraph}
|
|
231340
231404
|
`;
|
|
231341
231405
|
}
|
|
231406
|
+
const nestedPrefixes = sortPrefixesByDepth(Object.keys(edgeGroups).filter((nestedPrefix) => nestedPrefix.startsWith(`${prefix}:`) && nestedPrefix !== prefix && nestedPrefix.split(":").length === prefix.split(":").length + 1));
|
|
231407
|
+
for (const nestedPrefix of nestedPrefixes)
|
|
231408
|
+
addSubgraph(edgeGroups[nestedPrefix], nestedPrefix);
|
|
231342
231409
|
for (const edge of edges$1) {
|
|
231343
231410
|
const { source, target, data, conditional } = edge;
|
|
231344
231411
|
let edgeLabel = "";
|
|
@@ -231353,9 +231420,6 @@ graph TD;
|
|
|
231353
231420
|
mermaidGraph += ` ${_escapeNodeLabel(source)}${edgeLabel}${_escapeNodeLabel(target)};
|
|
231354
231421
|
`;
|
|
231355
231422
|
}
|
|
231356
|
-
for (const nestedPrefix in edgeGroups)
|
|
231357
|
-
if (nestedPrefix.startsWith(`${prefix}:`) && nestedPrefix !== prefix)
|
|
231358
|
-
addSubgraph(edgeGroups[nestedPrefix], nestedPrefix);
|
|
231359
231423
|
if (prefix && !selfLoop)
|
|
231360
231424
|
mermaidGraph += ` end
|
|
231361
231425
|
`;
|
|
@@ -233583,14 +233647,14 @@ __export222(json_schema_exports, {
|
|
|
233583
233647
|
toJsonSchema: () => toJsonSchema,
|
|
233584
233648
|
validatesOnlyStrings: () => validatesOnlyStrings
|
|
233585
233649
|
});
|
|
233586
|
-
function toJsonSchema(schema2) {
|
|
233650
|
+
function toJsonSchema(schema2, params2) {
|
|
233587
233651
|
if (isZodSchemaV4(schema2)) {
|
|
233588
233652
|
const inputSchema = interopZodTransformInputSchema(schema2, true);
|
|
233589
233653
|
if (isZodObjectV4(inputSchema)) {
|
|
233590
233654
|
const strictSchema = interopZodObjectStrict(inputSchema, true);
|
|
233591
|
-
return toJSONSchema3(strictSchema);
|
|
233655
|
+
return toJSONSchema3(strictSchema, params2);
|
|
233592
233656
|
} else
|
|
233593
|
-
return toJSONSchema3(schema2);
|
|
233657
|
+
return toJSONSchema3(schema2, params2);
|
|
233594
233658
|
}
|
|
233595
233659
|
if (isZodSchemaV3(schema2))
|
|
233596
233660
|
return zodToJsonSchema3(schema2);
|
|
@@ -241542,6 +241606,107 @@ function _stringify(content3) {
|
|
|
241542
241606
|
return `${content3}`;
|
|
241543
241607
|
}
|
|
241544
241608
|
}
|
|
241609
|
+
var ComputerUseScreenshotActionSchema = exports_external2.object({ type: exports_external2.literal("screenshot") });
|
|
241610
|
+
var ComputerUseClickActionSchema = exports_external2.object({
|
|
241611
|
+
type: exports_external2.literal("click"),
|
|
241612
|
+
x: exports_external2.number(),
|
|
241613
|
+
y: exports_external2.number(),
|
|
241614
|
+
button: exports_external2.enum([
|
|
241615
|
+
"left",
|
|
241616
|
+
"right",
|
|
241617
|
+
"wheel",
|
|
241618
|
+
"back",
|
|
241619
|
+
"forward"
|
|
241620
|
+
]).default("left")
|
|
241621
|
+
});
|
|
241622
|
+
var ComputerUseDoubleClickActionSchema = exports_external2.object({
|
|
241623
|
+
type: exports_external2.literal("double_click"),
|
|
241624
|
+
x: exports_external2.number(),
|
|
241625
|
+
y: exports_external2.number(),
|
|
241626
|
+
button: exports_external2.enum([
|
|
241627
|
+
"left",
|
|
241628
|
+
"right",
|
|
241629
|
+
"wheel",
|
|
241630
|
+
"back",
|
|
241631
|
+
"forward"
|
|
241632
|
+
]).default("left")
|
|
241633
|
+
});
|
|
241634
|
+
var ComputerUseDragActionSchema = exports_external2.object({
|
|
241635
|
+
type: exports_external2.literal("drag"),
|
|
241636
|
+
path: exports_external2.array(exports_external2.object({
|
|
241637
|
+
x: exports_external2.number(),
|
|
241638
|
+
y: exports_external2.number()
|
|
241639
|
+
}))
|
|
241640
|
+
});
|
|
241641
|
+
var ComputerUseKeypressActionSchema = exports_external2.object({
|
|
241642
|
+
type: exports_external2.literal("keypress"),
|
|
241643
|
+
keys: exports_external2.array(exports_external2.string())
|
|
241644
|
+
});
|
|
241645
|
+
var ComputerUseMoveActionSchema = exports_external2.object({
|
|
241646
|
+
type: exports_external2.literal("move"),
|
|
241647
|
+
x: exports_external2.number(),
|
|
241648
|
+
y: exports_external2.number()
|
|
241649
|
+
});
|
|
241650
|
+
var ComputerUseScrollActionSchema = exports_external2.object({
|
|
241651
|
+
type: exports_external2.literal("scroll"),
|
|
241652
|
+
x: exports_external2.number(),
|
|
241653
|
+
y: exports_external2.number(),
|
|
241654
|
+
scroll_x: exports_external2.number(),
|
|
241655
|
+
scroll_y: exports_external2.number()
|
|
241656
|
+
});
|
|
241657
|
+
var ComputerUseTypeActionSchema = exports_external2.object({
|
|
241658
|
+
type: exports_external2.literal("type"),
|
|
241659
|
+
text: exports_external2.string()
|
|
241660
|
+
});
|
|
241661
|
+
var ComputerUseWaitActionSchema = exports_external2.object({
|
|
241662
|
+
type: exports_external2.literal("wait"),
|
|
241663
|
+
duration: exports_external2.number().optional()
|
|
241664
|
+
});
|
|
241665
|
+
var ComputerUseActionUnionSchema = exports_external2.discriminatedUnion("type", [
|
|
241666
|
+
ComputerUseScreenshotActionSchema,
|
|
241667
|
+
ComputerUseClickActionSchema,
|
|
241668
|
+
ComputerUseDoubleClickActionSchema,
|
|
241669
|
+
ComputerUseDragActionSchema,
|
|
241670
|
+
ComputerUseKeypressActionSchema,
|
|
241671
|
+
ComputerUseMoveActionSchema,
|
|
241672
|
+
ComputerUseScrollActionSchema,
|
|
241673
|
+
ComputerUseTypeActionSchema,
|
|
241674
|
+
ComputerUseWaitActionSchema
|
|
241675
|
+
]);
|
|
241676
|
+
var ComputerUseActionSchema = exports_external2.object({ action: ComputerUseActionUnionSchema });
|
|
241677
|
+
var LocalShellExecActionSchema = exports_external2.object({
|
|
241678
|
+
type: exports_external2.literal("exec"),
|
|
241679
|
+
command: exports_external2.array(exports_external2.string()),
|
|
241680
|
+
env: exports_external2.record(exports_external2.string(), exports_external2.string()).optional(),
|
|
241681
|
+
working_directory: exports_external2.string().optional(),
|
|
241682
|
+
timeout_ms: exports_external2.number().optional(),
|
|
241683
|
+
user: exports_external2.string().optional()
|
|
241684
|
+
});
|
|
241685
|
+
var LocalShellActionSchema = exports_external2.discriminatedUnion("type", [LocalShellExecActionSchema]);
|
|
241686
|
+
var ShellActionSchema = exports_external2.object({
|
|
241687
|
+
commands: exports_external2.array(exports_external2.string()).describe("Array of shell commands to execute"),
|
|
241688
|
+
timeout_ms: exports_external2.number().optional().describe("Optional timeout in milliseconds for the commands"),
|
|
241689
|
+
max_output_length: exports_external2.number().optional().describe("Optional maximum number of characters to return from each command")
|
|
241690
|
+
});
|
|
241691
|
+
var ApplyPatchCreateFileOperationSchema = exports_external2.object({
|
|
241692
|
+
type: exports_external2.literal("create_file"),
|
|
241693
|
+
path: exports_external2.string(),
|
|
241694
|
+
diff: exports_external2.string()
|
|
241695
|
+
});
|
|
241696
|
+
var ApplyPatchUpdateFileOperationSchema = exports_external2.object({
|
|
241697
|
+
type: exports_external2.literal("update_file"),
|
|
241698
|
+
path: exports_external2.string(),
|
|
241699
|
+
diff: exports_external2.string()
|
|
241700
|
+
});
|
|
241701
|
+
var ApplyPatchDeleteFileOperationSchema = exports_external2.object({
|
|
241702
|
+
type: exports_external2.literal("delete_file"),
|
|
241703
|
+
path: exports_external2.string()
|
|
241704
|
+
});
|
|
241705
|
+
var ApplyPatchOperationSchema = exports_external2.discriminatedUnion("type", [
|
|
241706
|
+
ApplyPatchCreateFileOperationSchema,
|
|
241707
|
+
ApplyPatchUpdateFileOperationSchema,
|
|
241708
|
+
ApplyPatchDeleteFileOperationSchema
|
|
241709
|
+
]);
|
|
241545
241710
|
var Document = class {
|
|
241546
241711
|
pageContent;
|
|
241547
241712
|
metadata;
|
|
@@ -258051,7 +258216,7 @@ var optionalType3 = ZodOptional6.create;
|
|
|
258051
258216
|
var nullableType3 = ZodNullable6.create;
|
|
258052
258217
|
var preprocessType3 = ZodEffects3.createWithPreprocess;
|
|
258053
258218
|
var pipelineType3 = ZodPipeline3.create;
|
|
258054
|
-
// ../../node_modules/.pnpm/@ai-sdk+provider-utils@3.0.
|
|
258219
|
+
// ../../node_modules/.pnpm/@ai-sdk+provider-utils@3.0.19_zod@3.25.76/node_modules/@ai-sdk/provider-utils/dist/index.mjs
|
|
258055
258220
|
function combineHeaders(...headers) {
|
|
258056
258221
|
return headers.reduce((combinedHeaders, currentHeaders) => ({
|
|
258057
258222
|
...combinedHeaders,
|
|
@@ -258241,7 +258406,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
|
258241
258406
|
normalizedHeaders.set("user-agent", [currentUserAgentHeader, ...userAgentSuffixParts].filter(Boolean).join(" "));
|
|
258242
258407
|
return Object.fromEntries(normalizedHeaders.entries());
|
|
258243
258408
|
}
|
|
258244
|
-
var VERSION2 = "3.0.
|
|
258409
|
+
var VERSION2 = "3.0.19";
|
|
258245
258410
|
var getOriginalFetch = () => globalThis.fetch;
|
|
258246
258411
|
var getFromApi = async ({
|
|
258247
258412
|
url: url3,
|
|
@@ -258680,9 +258845,6 @@ var postToApi = async ({
|
|
|
258680
258845
|
function tool2(tool22) {
|
|
258681
258846
|
return tool22;
|
|
258682
258847
|
}
|
|
258683
|
-
function dynamicTool(tool22) {
|
|
258684
|
-
return { ...tool22, type: "dynamic" };
|
|
258685
|
-
}
|
|
258686
258848
|
function createProviderDefinedToolFactory({
|
|
258687
258849
|
id,
|
|
258688
258850
|
name: name14,
|
|
@@ -258864,6 +259026,25 @@ var createBinaryResponseHandler = () => async ({ response, url: url3, requestBod
|
|
|
258864
259026
|
});
|
|
258865
259027
|
}
|
|
258866
259028
|
};
|
|
259029
|
+
function addAdditionalPropertiesToJsonSchema(jsonSchema2) {
|
|
259030
|
+
if (jsonSchema2.type === "object") {
|
|
259031
|
+
jsonSchema2.additionalProperties = false;
|
|
259032
|
+
const properties = jsonSchema2.properties;
|
|
259033
|
+
if (properties != null) {
|
|
259034
|
+
for (const property in properties) {
|
|
259035
|
+
properties[property] = addAdditionalPropertiesToJsonSchema(properties[property]);
|
|
259036
|
+
}
|
|
259037
|
+
}
|
|
259038
|
+
}
|
|
259039
|
+
if (jsonSchema2.type === "array" && jsonSchema2.items != null) {
|
|
259040
|
+
if (Array.isArray(jsonSchema2.items)) {
|
|
259041
|
+
jsonSchema2.items = jsonSchema2.items.map((item) => addAdditionalPropertiesToJsonSchema(item));
|
|
259042
|
+
} else {
|
|
259043
|
+
jsonSchema2.items = addAdditionalPropertiesToJsonSchema(jsonSchema2.items);
|
|
259044
|
+
}
|
|
259045
|
+
}
|
|
259046
|
+
return jsonSchema2;
|
|
259047
|
+
}
|
|
258867
259048
|
var getRelativePath2 = (pathA, pathB) => {
|
|
258868
259049
|
let i155 = 0;
|
|
258869
259050
|
for (;i155 < pathA.length && i155 < pathB.length; i155++) {
|
|
@@ -259873,11 +260054,11 @@ function zod3Schema(zodSchema2, options) {
|
|
|
259873
260054
|
function zod4Schema(zodSchema2, options) {
|
|
259874
260055
|
var _a15;
|
|
259875
260056
|
const useReferences = (_a15 = options == null ? undefined : options.useReferences) != null ? _a15 : false;
|
|
259876
|
-
return jsonSchema(() => toJSONSchema4(zodSchema2, {
|
|
260057
|
+
return jsonSchema(() => addAdditionalPropertiesToJsonSchema(toJSONSchema4(zodSchema2, {
|
|
259877
260058
|
target: "draft-7",
|
|
259878
|
-
io: "
|
|
260059
|
+
io: "input",
|
|
259879
260060
|
reused: useReferences ? "ref" : "inline"
|
|
259880
|
-
}), {
|
|
260061
|
+
})), {
|
|
259881
260062
|
validate: async (value) => {
|
|
259882
260063
|
const result = await safeParseAsync7(zodSchema2, value);
|
|
259883
260064
|
return result.success ? { success: true, value: result.data } : { success: false, error: result.error };
|
|
@@ -259969,7 +260150,7 @@ async function* executeTool({
|
|
|
259969
260150
|
}
|
|
259970
260151
|
}
|
|
259971
260152
|
|
|
259972
|
-
// ../../node_modules/.pnpm/@ai-sdk+gateway@2.0.
|
|
260153
|
+
// ../../node_modules/.pnpm/@ai-sdk+gateway@2.0.21_zod@3.25.76/node_modules/@ai-sdk/gateway/dist/index.mjs
|
|
259973
260154
|
var import_oidc = __toESM(require_dist4(), 1);
|
|
259974
260155
|
var import_oidc2 = __toESM(require_dist4(), 1);
|
|
259975
260156
|
var marker15 = "vercel.ai.gateway.error";
|
|
@@ -260607,7 +260788,7 @@ async function getVercelRequestId() {
|
|
|
260607
260788
|
var _a82;
|
|
260608
260789
|
return (_a82 = import_oidc.getContext().headers) == null ? undefined : _a82["x-vercel-id"];
|
|
260609
260790
|
}
|
|
260610
|
-
var VERSION3 = "2.0.
|
|
260791
|
+
var VERSION3 = "2.0.21";
|
|
260611
260792
|
var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
|
|
260612
260793
|
function createGatewayProvider(options = {}) {
|
|
260613
260794
|
var _a82, _b8;
|
|
@@ -260743,7 +260924,7 @@ async function getGatewayAuthToken(options) {
|
|
|
260743
260924
|
}
|
|
260744
260925
|
}
|
|
260745
260926
|
|
|
260746
|
-
// ../../node_modules/.pnpm/ai@5.0.
|
|
260927
|
+
// ../../node_modules/.pnpm/ai@5.0.113_zod@3.25.76/node_modules/ai/dist/index.mjs
|
|
260747
260928
|
var import_api2 = __toESM(require_src6(), 1);
|
|
260748
260929
|
var import_api3 = __toESM(require_src6(), 1);
|
|
260749
260930
|
var __defProp5 = Object.defineProperty;
|
|
@@ -261147,7 +261328,7 @@ function detectMediaType({
|
|
|
261147
261328
|
}
|
|
261148
261329
|
return;
|
|
261149
261330
|
}
|
|
261150
|
-
var VERSION4 = "5.0.
|
|
261331
|
+
var VERSION4 = "5.0.113";
|
|
261151
261332
|
var download = async ({ url: url3 }) => {
|
|
261152
261333
|
var _a16;
|
|
261153
261334
|
const urlText = url3.toString();
|
|
@@ -261739,14 +261920,25 @@ async function standardizePrompt(prompt) {
|
|
|
261739
261920
|
};
|
|
261740
261921
|
}
|
|
261741
261922
|
function wrapGatewayError(error42) {
|
|
261742
|
-
if (GatewayAuthenticationError.isInstance(error42)
|
|
261923
|
+
if (!GatewayAuthenticationError.isInstance(error42))
|
|
261924
|
+
return error42;
|
|
261925
|
+
const isProductionEnv = (process == null ? undefined : "production") === "production";
|
|
261926
|
+
const moreInfoURL = "https://ai-sdk.dev/unauthenticated-ai-gateway";
|
|
261927
|
+
if (isProductionEnv) {
|
|
261743
261928
|
return new AISDKError({
|
|
261744
261929
|
name: "GatewayError",
|
|
261745
|
-
message:
|
|
261746
|
-
cause: error42
|
|
261930
|
+
message: `Unauthenticated. Configure AI_GATEWAY_API_KEY or use a provider module. Learn more: ${moreInfoURL}`
|
|
261747
261931
|
});
|
|
261748
261932
|
}
|
|
261749
|
-
return
|
|
261933
|
+
return Object.assign(new Error(`\x1B[1m\x1B[31mUnauthenticated request to AI Gateway.\x1B[0m
|
|
261934
|
+
|
|
261935
|
+
To authenticate, set the \x1B[33mAI_GATEWAY_API_KEY\x1B[0m environment variable with your API key.
|
|
261936
|
+
|
|
261937
|
+
Alternatively, you can use a provider module instead of the AI Gateway.
|
|
261938
|
+
|
|
261939
|
+
Learn more: \x1B[34m${moreInfoURL}\x1B[0m
|
|
261940
|
+
|
|
261941
|
+
`), { name: "GatewayAuthenticationError" });
|
|
261750
261942
|
}
|
|
261751
261943
|
function assembleOperationName({
|
|
261752
261944
|
operationId,
|
|
@@ -265425,6 +265617,102 @@ var uiMessagesSchema = lazyValidator(() => zodSchema(exports_external3.array(exp
|
|
|
265425
265617
|
})
|
|
265426
265618
|
])).nonempty("Message must contain at least one part")
|
|
265427
265619
|
})).nonempty("Messages array must not be empty")));
|
|
265620
|
+
// ../../node_modules/.pnpm/@ai-sdk+provider-utils@3.0.18_zod@3.25.76/node_modules/@ai-sdk/provider-utils/dist/index.mjs
|
|
265621
|
+
var createIdGenerator2 = ({
|
|
265622
|
+
prefix,
|
|
265623
|
+
size = 16,
|
|
265624
|
+
alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
|
265625
|
+
separator = "-"
|
|
265626
|
+
} = {}) => {
|
|
265627
|
+
const generator = () => {
|
|
265628
|
+
const alphabetLength = alphabet.length;
|
|
265629
|
+
const chars = new Array(size);
|
|
265630
|
+
for (let i155 = 0;i155 < size; i155++) {
|
|
265631
|
+
chars[i155] = alphabet[Math.random() * alphabetLength | 0];
|
|
265632
|
+
}
|
|
265633
|
+
return chars.join("");
|
|
265634
|
+
};
|
|
265635
|
+
if (prefix == null) {
|
|
265636
|
+
return generator;
|
|
265637
|
+
}
|
|
265638
|
+
if (alphabet.includes(separator)) {
|
|
265639
|
+
throw new InvalidArgumentError({
|
|
265640
|
+
argument: "separator",
|
|
265641
|
+
message: `The separator "${separator}" must not be part of the alphabet "${alphabet}".`
|
|
265642
|
+
});
|
|
265643
|
+
}
|
|
265644
|
+
return () => `${prefix}${separator}${generator()}`;
|
|
265645
|
+
};
|
|
265646
|
+
var generateId2 = createIdGenerator2();
|
|
265647
|
+
function getRuntimeEnvironmentUserAgent2(globalThisAny = globalThis) {
|
|
265648
|
+
var _a16, _b8, _c;
|
|
265649
|
+
if (globalThisAny.window) {
|
|
265650
|
+
return `runtime/browser`;
|
|
265651
|
+
}
|
|
265652
|
+
if ((_a16 = globalThisAny.navigator) == null ? undefined : _a16.userAgent) {
|
|
265653
|
+
return `runtime/${globalThisAny.navigator.userAgent.toLowerCase()}`;
|
|
265654
|
+
}
|
|
265655
|
+
if ((_c = (_b8 = globalThisAny.process) == null ? undefined : _b8.versions) == null ? undefined : _c.node) {
|
|
265656
|
+
return `runtime/node.js/${globalThisAny.process.version.substring(0)}`;
|
|
265657
|
+
}
|
|
265658
|
+
if (globalThisAny.EdgeRuntime) {
|
|
265659
|
+
return `runtime/vercel-edge`;
|
|
265660
|
+
}
|
|
265661
|
+
return "runtime/unknown";
|
|
265662
|
+
}
|
|
265663
|
+
function normalizeHeaders3(headers) {
|
|
265664
|
+
if (headers == null) {
|
|
265665
|
+
return {};
|
|
265666
|
+
}
|
|
265667
|
+
const normalized = {};
|
|
265668
|
+
if (headers instanceof Headers) {
|
|
265669
|
+
headers.forEach((value, key) => {
|
|
265670
|
+
normalized[key.toLowerCase()] = value;
|
|
265671
|
+
});
|
|
265672
|
+
} else {
|
|
265673
|
+
if (!Array.isArray(headers)) {
|
|
265674
|
+
headers = Object.entries(headers);
|
|
265675
|
+
}
|
|
265676
|
+
for (const [key, value] of headers) {
|
|
265677
|
+
if (value != null) {
|
|
265678
|
+
normalized[key.toLowerCase()] = value;
|
|
265679
|
+
}
|
|
265680
|
+
}
|
|
265681
|
+
}
|
|
265682
|
+
return normalized;
|
|
265683
|
+
}
|
|
265684
|
+
function withUserAgentSuffix2(headers, ...userAgentSuffixParts) {
|
|
265685
|
+
const normalizedHeaders = new Headers(normalizeHeaders3(headers));
|
|
265686
|
+
const currentUserAgentHeader = normalizedHeaders.get("user-agent") || "";
|
|
265687
|
+
normalizedHeaders.set("user-agent", [currentUserAgentHeader, ...userAgentSuffixParts].filter(Boolean).join(" "));
|
|
265688
|
+
return Object.fromEntries(normalizedHeaders.entries());
|
|
265689
|
+
}
|
|
265690
|
+
var validatorSymbol2 = Symbol.for("vercel.ai.validator");
|
|
265691
|
+
function tool3(tool22) {
|
|
265692
|
+
return tool22;
|
|
265693
|
+
}
|
|
265694
|
+
function dynamicTool(tool22) {
|
|
265695
|
+
return { ...tool22, type: "dynamic" };
|
|
265696
|
+
}
|
|
265697
|
+
var ignoreOverride5 = Symbol("Let zodToJsonSchema decide on which parser to use");
|
|
265698
|
+
var ALPHA_NUMERIC5 = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
|
|
265699
|
+
var schemaSymbol2 = Symbol.for("vercel.ai.schema");
|
|
265700
|
+
function jsonSchema2(jsonSchema22, {
|
|
265701
|
+
validate: validate5
|
|
265702
|
+
} = {}) {
|
|
265703
|
+
return {
|
|
265704
|
+
[schemaSymbol2]: true,
|
|
265705
|
+
_type: undefined,
|
|
265706
|
+
[validatorSymbol2]: true,
|
|
265707
|
+
get jsonSchema() {
|
|
265708
|
+
if (typeof jsonSchema22 === "function") {
|
|
265709
|
+
jsonSchema22 = jsonSchema22();
|
|
265710
|
+
}
|
|
265711
|
+
return jsonSchema22;
|
|
265712
|
+
},
|
|
265713
|
+
validate: validate5
|
|
265714
|
+
};
|
|
265715
|
+
}
|
|
265428
265716
|
|
|
265429
265717
|
// ../../node_modules/.pnpm/pkce-challenge@5.0.1/node_modules/pkce-challenge/dist/index.node.js
|
|
265430
265718
|
var crypto3;
|
|
@@ -266355,7 +266643,7 @@ var SseMCPTransport = class {
|
|
|
266355
266643
|
headers["Authorization"] = `Bearer ${tokens.access_token}`;
|
|
266356
266644
|
}
|
|
266357
266645
|
}
|
|
266358
|
-
return
|
|
266646
|
+
return withUserAgentSuffix2(headers, `ai-sdk/${VERSION5}`, getRuntimeEnvironmentUserAgent2());
|
|
266359
266647
|
}
|
|
266360
266648
|
async start() {
|
|
266361
266649
|
return new Promise((resolve2, reject) => {
|
|
@@ -266557,7 +266845,7 @@ var HttpMCPTransport = class {
|
|
|
266557
266845
|
headers["Authorization"] = `Bearer ${tokens.access_token}`;
|
|
266558
266846
|
}
|
|
266559
266847
|
}
|
|
266560
|
-
return
|
|
266848
|
+
return withUserAgentSuffix2(headers, `ai-sdk/${VERSION5}`, getRuntimeEnvironmentUserAgent2());
|
|
266561
266849
|
}
|
|
266562
266850
|
async start() {
|
|
266563
266851
|
if (this.abortController) {
|
|
@@ -267139,13 +267427,13 @@ var DefaultMCPClient = class {
|
|
|
267139
267427
|
};
|
|
267140
267428
|
const toolWithExecute = schemas3 === "automatic" ? dynamicTool({
|
|
267141
267429
|
description,
|
|
267142
|
-
inputSchema:
|
|
267430
|
+
inputSchema: jsonSchema2({
|
|
267143
267431
|
...inputSchema,
|
|
267144
267432
|
properties: (_a35 = inputSchema.properties) != null ? _a35 : {},
|
|
267145
267433
|
additionalProperties: false
|
|
267146
267434
|
}),
|
|
267147
267435
|
execute
|
|
267148
|
-
}) :
|
|
267436
|
+
}) : tool3({
|
|
267149
267437
|
description,
|
|
267150
267438
|
inputSchema: schemas3[name34].inputSchema,
|
|
267151
267439
|
execute
|
|
@@ -267618,8 +267906,8 @@ function S4(t480) {
|
|
|
267618
267906
|
}, S4(t480);
|
|
267619
267907
|
}
|
|
267620
267908
|
|
|
267621
|
-
// ../../node_modules/.pnpm/@ai-sdk+anthropic@2.0.
|
|
267622
|
-
var VERSION6 = "2.0.
|
|
267909
|
+
// ../../node_modules/.pnpm/@ai-sdk+anthropic@2.0.56_zod@3.25.76/node_modules/@ai-sdk/anthropic/dist/index.mjs
|
|
267910
|
+
var VERSION6 = "2.0.56";
|
|
267623
267911
|
var anthropicErrorDataSchema = lazySchema(() => zodSchema(exports_external3.object({
|
|
267624
267912
|
type: exports_external3.literal("error"),
|
|
267625
267913
|
error: exports_external3.object({
|
|
@@ -267698,11 +267986,18 @@ var anthropicMessagesResponseSchema = lazySchema(() => zodSchema(exports_externa
|
|
|
267698
267986
|
type: exports_external3.literal("document"),
|
|
267699
267987
|
title: exports_external3.string().nullable(),
|
|
267700
267988
|
citations: exports_external3.object({ enabled: exports_external3.boolean() }).optional(),
|
|
267701
|
-
source: exports_external3.
|
|
267702
|
-
|
|
267703
|
-
|
|
267704
|
-
|
|
267705
|
-
|
|
267989
|
+
source: exports_external3.union([
|
|
267990
|
+
exports_external3.object({
|
|
267991
|
+
type: exports_external3.literal("base64"),
|
|
267992
|
+
media_type: exports_external3.literal("application/pdf"),
|
|
267993
|
+
data: exports_external3.string()
|
|
267994
|
+
}),
|
|
267995
|
+
exports_external3.object({
|
|
267996
|
+
type: exports_external3.literal("text"),
|
|
267997
|
+
media_type: exports_external3.literal("text/plain"),
|
|
267998
|
+
data: exports_external3.string()
|
|
267999
|
+
})
|
|
268000
|
+
])
|
|
267706
268001
|
})
|
|
267707
268002
|
}),
|
|
267708
268003
|
exports_external3.object({
|
|
@@ -267865,11 +268160,18 @@ var anthropicMessagesChunkSchema = lazySchema(() => zodSchema(exports_external3.
|
|
|
267865
268160
|
type: exports_external3.literal("document"),
|
|
267866
268161
|
title: exports_external3.string().nullable(),
|
|
267867
268162
|
citations: exports_external3.object({ enabled: exports_external3.boolean() }).optional(),
|
|
267868
|
-
source: exports_external3.
|
|
267869
|
-
|
|
267870
|
-
|
|
267871
|
-
|
|
267872
|
-
|
|
268163
|
+
source: exports_external3.union([
|
|
268164
|
+
exports_external3.object({
|
|
268165
|
+
type: exports_external3.literal("base64"),
|
|
268166
|
+
media_type: exports_external3.literal("application/pdf"),
|
|
268167
|
+
data: exports_external3.string()
|
|
268168
|
+
}),
|
|
268169
|
+
exports_external3.object({
|
|
268170
|
+
type: exports_external3.literal("text"),
|
|
268171
|
+
media_type: exports_external3.literal("text/plain"),
|
|
268172
|
+
data: exports_external3.string()
|
|
268173
|
+
})
|
|
268174
|
+
])
|
|
267873
268175
|
})
|
|
267874
268176
|
}),
|
|
267875
268177
|
exports_external3.object({
|
|
@@ -268161,7 +268463,7 @@ var webSearch_20250305ArgsSchema = lazySchema(() => zodSchema(exports_external3.
|
|
|
268161
268463
|
})));
|
|
268162
268464
|
var webSearch_20250305OutputSchema = lazySchema(() => zodSchema(exports_external3.array(exports_external3.object({
|
|
268163
268465
|
url: exports_external3.string(),
|
|
268164
|
-
title: exports_external3.string(),
|
|
268466
|
+
title: exports_external3.string().nullable(),
|
|
268165
268467
|
pageAge: exports_external3.string().nullable(),
|
|
268166
268468
|
encryptedContent: exports_external3.string(),
|
|
268167
268469
|
type: exports_external3.literal("web_search_result")
|
|
@@ -268190,7 +268492,7 @@ var webFetch_20250910OutputSchema = lazySchema(() => zodSchema(exports_external3
|
|
|
268190
268492
|
url: exports_external3.string(),
|
|
268191
268493
|
content: exports_external3.object({
|
|
268192
268494
|
type: exports_external3.literal("document"),
|
|
268193
|
-
title: exports_external3.string(),
|
|
268495
|
+
title: exports_external3.string().nullable(),
|
|
268194
268496
|
citations: exports_external3.object({ enabled: exports_external3.boolean() }).optional(),
|
|
268195
268497
|
source: exports_external3.union([
|
|
268196
268498
|
exports_external3.object({
|
|
@@ -268233,23 +268535,23 @@ async function prepareTools({
|
|
|
268233
268535
|
return { tools: undefined, toolChoice: undefined, toolWarnings, betas };
|
|
268234
268536
|
}
|
|
268235
268537
|
const anthropicTools2 = [];
|
|
268236
|
-
for (const
|
|
268237
|
-
switch (
|
|
268538
|
+
for (const tool4 of tools) {
|
|
268539
|
+
switch (tool4.type) {
|
|
268238
268540
|
case "function": {
|
|
268239
|
-
const cacheControl = validator4.getCacheControl(
|
|
268541
|
+
const cacheControl = validator4.getCacheControl(tool4.providerOptions, {
|
|
268240
268542
|
type: "tool definition",
|
|
268241
268543
|
canCache: true
|
|
268242
268544
|
});
|
|
268243
268545
|
anthropicTools2.push({
|
|
268244
|
-
name:
|
|
268245
|
-
description:
|
|
268246
|
-
input_schema:
|
|
268546
|
+
name: tool4.name,
|
|
268547
|
+
description: tool4.description,
|
|
268548
|
+
input_schema: tool4.inputSchema,
|
|
268247
268549
|
cache_control: cacheControl
|
|
268248
268550
|
});
|
|
268249
268551
|
break;
|
|
268250
268552
|
}
|
|
268251
268553
|
case "provider-defined": {
|
|
268252
|
-
switch (
|
|
268554
|
+
switch (tool4.id) {
|
|
268253
268555
|
case "anthropic.code_execution_20250522": {
|
|
268254
268556
|
betas.add("code-execution-2025-05-22");
|
|
268255
268557
|
anthropicTools2.push({
|
|
@@ -268272,9 +268574,9 @@ async function prepareTools({
|
|
|
268272
268574
|
anthropicTools2.push({
|
|
268273
268575
|
name: "computer",
|
|
268274
268576
|
type: "computer_20250124",
|
|
268275
|
-
display_width_px:
|
|
268276
|
-
display_height_px:
|
|
268277
|
-
display_number:
|
|
268577
|
+
display_width_px: tool4.args.displayWidthPx,
|
|
268578
|
+
display_height_px: tool4.args.displayHeightPx,
|
|
268579
|
+
display_number: tool4.args.displayNumber,
|
|
268278
268580
|
cache_control: undefined
|
|
268279
268581
|
});
|
|
268280
268582
|
break;
|
|
@@ -268284,9 +268586,9 @@ async function prepareTools({
|
|
|
268284
268586
|
anthropicTools2.push({
|
|
268285
268587
|
name: "computer",
|
|
268286
268588
|
type: "computer_20241022",
|
|
268287
|
-
display_width_px:
|
|
268288
|
-
display_height_px:
|
|
268289
|
-
display_number:
|
|
268589
|
+
display_width_px: tool4.args.displayWidthPx,
|
|
268590
|
+
display_height_px: tool4.args.displayHeightPx,
|
|
268591
|
+
display_number: tool4.args.displayNumber,
|
|
268290
268592
|
cache_control: undefined
|
|
268291
268593
|
});
|
|
268292
268594
|
break;
|
|
@@ -268320,7 +268622,7 @@ async function prepareTools({
|
|
|
268320
268622
|
}
|
|
268321
268623
|
case "anthropic.text_editor_20250728": {
|
|
268322
268624
|
const args = await validateTypes({
|
|
268323
|
-
value:
|
|
268625
|
+
value: tool4.args,
|
|
268324
268626
|
schema: textEditor_20250728ArgsSchema
|
|
268325
268627
|
});
|
|
268326
268628
|
anthropicTools2.push({
|
|
@@ -268360,7 +268662,7 @@ async function prepareTools({
|
|
|
268360
268662
|
case "anthropic.web_fetch_20250910": {
|
|
268361
268663
|
betas.add("web-fetch-2025-09-10");
|
|
268362
268664
|
const args = await validateTypes({
|
|
268363
|
-
value:
|
|
268665
|
+
value: tool4.args,
|
|
268364
268666
|
schema: webFetch_20250910ArgsSchema
|
|
268365
268667
|
});
|
|
268366
268668
|
anthropicTools2.push({
|
|
@@ -268377,7 +268679,7 @@ async function prepareTools({
|
|
|
268377
268679
|
}
|
|
268378
268680
|
case "anthropic.web_search_20250305": {
|
|
268379
268681
|
const args = await validateTypes({
|
|
268380
|
-
value:
|
|
268682
|
+
value: tool4.args,
|
|
268381
268683
|
schema: webSearch_20250305ArgsSchema
|
|
268382
268684
|
});
|
|
268383
268685
|
anthropicTools2.push({
|
|
@@ -268392,14 +268694,14 @@ async function prepareTools({
|
|
|
268392
268694
|
break;
|
|
268393
268695
|
}
|
|
268394
268696
|
default: {
|
|
268395
|
-
toolWarnings.push({ type: "unsupported-tool", tool:
|
|
268697
|
+
toolWarnings.push({ type: "unsupported-tool", tool: tool4 });
|
|
268396
268698
|
break;
|
|
268397
268699
|
}
|
|
268398
268700
|
}
|
|
268399
268701
|
break;
|
|
268400
268702
|
}
|
|
268401
268703
|
default: {
|
|
268402
|
-
toolWarnings.push({ type: "unsupported-tool", tool:
|
|
268704
|
+
toolWarnings.push({ type: "unsupported-tool", tool: tool4 });
|
|
268403
268705
|
break;
|
|
268404
268706
|
}
|
|
268405
268707
|
}
|
|
@@ -269316,7 +269618,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
269316
269618
|
betas.add("code-execution-2025-08-25");
|
|
269317
269619
|
betas.add("skills-2025-10-02");
|
|
269318
269620
|
betas.add("files-api-2025-04-14");
|
|
269319
|
-
if (!(tools == null ? undefined : tools.some((
|
|
269621
|
+
if (!(tools == null ? undefined : tools.some((tool4) => tool4.type === "provider-defined" && tool4.id === "anthropic.code_execution_20250825"))) {
|
|
269320
269622
|
warnings.push({
|
|
269321
269623
|
type: "other",
|
|
269322
269624
|
message: "code execution tool is required when using skills"
|
|
@@ -270397,7 +270699,7 @@ function createAnthropic(options = {}) {
|
|
|
270397
270699
|
}
|
|
270398
270700
|
var anthropic = createAnthropic();
|
|
270399
270701
|
|
|
270400
|
-
// ../../node_modules/.pnpm/@ai-sdk+openai@2.0.
|
|
270702
|
+
// ../../node_modules/.pnpm/@ai-sdk+openai@2.0.86_zod@3.25.76/node_modules/@ai-sdk/openai/dist/index.mjs
|
|
270401
270703
|
var openaiErrorDataSchema = exports_external3.object({
|
|
270402
270704
|
error: exports_external3.object({
|
|
270403
270705
|
message: exports_external3.string(),
|
|
@@ -270410,6 +270712,20 @@ var openaiFailedResponseHandler = createJsonErrorResponseHandler({
|
|
|
270410
270712
|
errorSchema: openaiErrorDataSchema,
|
|
270411
270713
|
errorToMessage: (data) => data.error.message
|
|
270412
270714
|
});
|
|
270715
|
+
function getOpenAILanguageModelCapabilities(modelId) {
|
|
270716
|
+
const supportsFlexProcessing = modelId.startsWith("o3") || modelId.startsWith("o4-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-chat");
|
|
270717
|
+
const supportsPriorityProcessing = modelId.startsWith("gpt-4") || modelId.startsWith("gpt-5-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-nano") && !modelId.startsWith("gpt-5-chat") || modelId.startsWith("o3") || modelId.startsWith("o4-mini");
|
|
270718
|
+
const isReasoningModel = !(modelId.startsWith("gpt-3") || modelId.startsWith("gpt-4") || modelId.startsWith("chatgpt-4o") || modelId.startsWith("gpt-5-chat"));
|
|
270719
|
+
const supportsNonReasoningParameters = modelId.startsWith("gpt-5.1");
|
|
270720
|
+
const systemMessageMode = isReasoningModel ? "developer" : "system";
|
|
270721
|
+
return {
|
|
270722
|
+
supportsFlexProcessing,
|
|
270723
|
+
supportsPriorityProcessing,
|
|
270724
|
+
isReasoningModel,
|
|
270725
|
+
systemMessageMode,
|
|
270726
|
+
supportsNonReasoningParameters
|
|
270727
|
+
};
|
|
270728
|
+
}
|
|
270413
270729
|
function convertToOpenAIChatMessages({
|
|
270414
270730
|
prompt,
|
|
270415
270731
|
systemMessageMode = "system"
|
|
@@ -270625,10 +270941,12 @@ var openaiChatResponseSchema = lazyValidator(() => zodSchema(exports_external3.o
|
|
|
270625
270941
|
})).nullish(),
|
|
270626
270942
|
annotations: exports_external3.array(exports_external3.object({
|
|
270627
270943
|
type: exports_external3.literal("url_citation"),
|
|
270628
|
-
|
|
270629
|
-
|
|
270630
|
-
|
|
270631
|
-
|
|
270944
|
+
url_citation: exports_external3.object({
|
|
270945
|
+
start_index: exports_external3.number(),
|
|
270946
|
+
end_index: exports_external3.number(),
|
|
270947
|
+
url: exports_external3.string(),
|
|
270948
|
+
title: exports_external3.string()
|
|
270949
|
+
})
|
|
270632
270950
|
})).nullish()
|
|
270633
270951
|
}),
|
|
270634
270952
|
index: exports_external3.number(),
|
|
@@ -270678,10 +270996,12 @@ var openaiChatChunkSchema = lazyValidator(() => zodSchema(exports_external3.unio
|
|
|
270678
270996
|
})).nullish(),
|
|
270679
270997
|
annotations: exports_external3.array(exports_external3.object({
|
|
270680
270998
|
type: exports_external3.literal("url_citation"),
|
|
270681
|
-
|
|
270682
|
-
|
|
270683
|
-
|
|
270684
|
-
|
|
270999
|
+
url_citation: exports_external3.object({
|
|
271000
|
+
start_index: exports_external3.number(),
|
|
271001
|
+
end_index: exports_external3.number(),
|
|
271002
|
+
url: exports_external3.string(),
|
|
271003
|
+
title: exports_external3.string()
|
|
271004
|
+
})
|
|
270685
271005
|
})).nullish()
|
|
270686
271006
|
}).nullish(),
|
|
270687
271007
|
logprobs: exports_external3.object({
|
|
@@ -270718,7 +271038,7 @@ var openaiChatLanguageModelOptions = lazyValidator(() => zodSchema(exports_exter
|
|
|
270718
271038
|
logprobs: exports_external3.union([exports_external3.boolean(), exports_external3.number()]).optional(),
|
|
270719
271039
|
parallelToolCalls: exports_external3.boolean().optional(),
|
|
270720
271040
|
user: exports_external3.string().optional(),
|
|
270721
|
-
reasoningEffort: exports_external3.enum(["none", "minimal", "low", "medium", "high"]).optional(),
|
|
271041
|
+
reasoningEffort: exports_external3.enum(["none", "minimal", "low", "medium", "high", "xhigh"]).optional(),
|
|
270722
271042
|
maxCompletionTokens: exports_external3.number().optional(),
|
|
270723
271043
|
store: exports_external3.boolean().optional(),
|
|
270724
271044
|
metadata: exports_external3.record(exports_external3.string().max(64), exports_external3.string().max(512)).optional(),
|
|
@@ -270743,21 +271063,21 @@ function prepareChatTools({
|
|
|
270743
271063
|
return { tools: undefined, toolChoice: undefined, toolWarnings };
|
|
270744
271064
|
}
|
|
270745
271065
|
const openaiTools2 = [];
|
|
270746
|
-
for (const
|
|
270747
|
-
switch (
|
|
271066
|
+
for (const tool4 of tools) {
|
|
271067
|
+
switch (tool4.type) {
|
|
270748
271068
|
case "function":
|
|
270749
271069
|
openaiTools2.push({
|
|
270750
271070
|
type: "function",
|
|
270751
271071
|
function: {
|
|
270752
|
-
name:
|
|
270753
|
-
description:
|
|
270754
|
-
parameters:
|
|
271072
|
+
name: tool4.name,
|
|
271073
|
+
description: tool4.description,
|
|
271074
|
+
parameters: tool4.inputSchema,
|
|
270755
271075
|
strict: structuredOutputs ? strictJsonSchema : undefined
|
|
270756
271076
|
}
|
|
270757
271077
|
});
|
|
270758
271078
|
break;
|
|
270759
271079
|
default:
|
|
270760
|
-
toolWarnings.push({ type: "unsupported-tool", tool:
|
|
271080
|
+
toolWarnings.push({ type: "unsupported-tool", tool: tool4 });
|
|
270761
271081
|
break;
|
|
270762
271082
|
}
|
|
270763
271083
|
}
|
|
@@ -270824,6 +271144,7 @@ var OpenAIChatLanguageModel = class {
|
|
|
270824
271144
|
schema: openaiChatLanguageModelOptions
|
|
270825
271145
|
})) != null ? _a16 : {};
|
|
270826
271146
|
const structuredOutputs = (_b9 = openaiOptions.structuredOutputs) != null ? _b9 : true;
|
|
271147
|
+
const modelCapabilities = getOpenAILanguageModelCapabilities(this.modelId);
|
|
270827
271148
|
if (topK != null) {
|
|
270828
271149
|
warnings.push({
|
|
270829
271150
|
type: "unsupported-setting",
|
|
@@ -270839,7 +271160,7 @@ var OpenAIChatLanguageModel = class {
|
|
|
270839
271160
|
}
|
|
270840
271161
|
const { messages, warnings: messageWarnings } = convertToOpenAIChatMessages({
|
|
270841
271162
|
prompt,
|
|
270842
|
-
systemMessageMode:
|
|
271163
|
+
systemMessageMode: modelCapabilities.systemMessageMode
|
|
270843
271164
|
});
|
|
270844
271165
|
warnings.push(...messageWarnings);
|
|
270845
271166
|
const strictJsonSchema = (_c = openaiOptions.strictJsonSchema) != null ? _c : false;
|
|
@@ -270878,22 +271199,31 @@ var OpenAIChatLanguageModel = class {
|
|
|
270878
271199
|
safety_identifier: openaiOptions.safetyIdentifier,
|
|
270879
271200
|
messages
|
|
270880
271201
|
};
|
|
270881
|
-
if (isReasoningModel
|
|
270882
|
-
if (
|
|
270883
|
-
baseArgs.temperature
|
|
270884
|
-
|
|
270885
|
-
|
|
270886
|
-
|
|
270887
|
-
|
|
270888
|
-
|
|
270889
|
-
|
|
270890
|
-
|
|
270891
|
-
baseArgs.top_p
|
|
270892
|
-
|
|
270893
|
-
|
|
270894
|
-
|
|
270895
|
-
|
|
270896
|
-
|
|
271202
|
+
if (modelCapabilities.isReasoningModel) {
|
|
271203
|
+
if (openaiOptions.reasoningEffort !== "none" || !modelCapabilities.supportsNonReasoningParameters) {
|
|
271204
|
+
if (baseArgs.temperature != null) {
|
|
271205
|
+
baseArgs.temperature = undefined;
|
|
271206
|
+
warnings.push({
|
|
271207
|
+
type: "unsupported-setting",
|
|
271208
|
+
setting: "temperature",
|
|
271209
|
+
details: "temperature is not supported for reasoning models"
|
|
271210
|
+
});
|
|
271211
|
+
}
|
|
271212
|
+
if (baseArgs.top_p != null) {
|
|
271213
|
+
baseArgs.top_p = undefined;
|
|
271214
|
+
warnings.push({
|
|
271215
|
+
type: "unsupported-setting",
|
|
271216
|
+
setting: "topP",
|
|
271217
|
+
details: "topP is not supported for reasoning models"
|
|
271218
|
+
});
|
|
271219
|
+
}
|
|
271220
|
+
if (baseArgs.logprobs != null) {
|
|
271221
|
+
baseArgs.logprobs = undefined;
|
|
271222
|
+
warnings.push({
|
|
271223
|
+
type: "other",
|
|
271224
|
+
message: "logprobs is not supported for reasoning models"
|
|
271225
|
+
});
|
|
271226
|
+
}
|
|
270897
271227
|
}
|
|
270898
271228
|
if (baseArgs.frequency_penalty != null) {
|
|
270899
271229
|
baseArgs.frequency_penalty = undefined;
|
|
@@ -270918,13 +271248,6 @@ var OpenAIChatLanguageModel = class {
|
|
|
270918
271248
|
message: "logitBias is not supported for reasoning models"
|
|
270919
271249
|
});
|
|
270920
271250
|
}
|
|
270921
|
-
if (baseArgs.logprobs != null) {
|
|
270922
|
-
baseArgs.logprobs = undefined;
|
|
270923
|
-
warnings.push({
|
|
270924
|
-
type: "other",
|
|
270925
|
-
message: "logprobs is not supported for reasoning models"
|
|
270926
|
-
});
|
|
270927
|
-
}
|
|
270928
271251
|
if (baseArgs.top_logprobs != null) {
|
|
270929
271252
|
baseArgs.top_logprobs = undefined;
|
|
270930
271253
|
warnings.push({
|
|
@@ -270948,7 +271271,7 @@ var OpenAIChatLanguageModel = class {
|
|
|
270948
271271
|
});
|
|
270949
271272
|
}
|
|
270950
271273
|
}
|
|
270951
|
-
if (openaiOptions.serviceTier === "flex" && !supportsFlexProcessing
|
|
271274
|
+
if (openaiOptions.serviceTier === "flex" && !modelCapabilities.supportsFlexProcessing) {
|
|
270952
271275
|
warnings.push({
|
|
270953
271276
|
type: "unsupported-setting",
|
|
270954
271277
|
setting: "serviceTier",
|
|
@@ -270956,7 +271279,7 @@ var OpenAIChatLanguageModel = class {
|
|
|
270956
271279
|
});
|
|
270957
271280
|
baseArgs.service_tier = undefined;
|
|
270958
271281
|
}
|
|
270959
|
-
if (openaiOptions.serviceTier === "priority" && !supportsPriorityProcessing
|
|
271282
|
+
if (openaiOptions.serviceTier === "priority" && !modelCapabilities.supportsPriorityProcessing) {
|
|
270960
271283
|
warnings.push({
|
|
270961
271284
|
type: "unsupported-setting",
|
|
270962
271285
|
setting: "serviceTier",
|
|
@@ -271021,8 +271344,8 @@ var OpenAIChatLanguageModel = class {
|
|
|
271021
271344
|
type: "source",
|
|
271022
271345
|
sourceType: "url",
|
|
271023
271346
|
id: generateId(),
|
|
271024
|
-
url: annotation.url,
|
|
271025
|
-
title: annotation.title
|
|
271347
|
+
url: annotation.url_citation.url,
|
|
271348
|
+
title: annotation.url_citation.title
|
|
271026
271349
|
});
|
|
271027
271350
|
}
|
|
271028
271351
|
const completionTokenDetails = (_d = response.usage) == null ? undefined : _d.completion_tokens_details;
|
|
@@ -271248,8 +271571,8 @@ var OpenAIChatLanguageModel = class {
|
|
|
271248
271571
|
type: "source",
|
|
271249
271572
|
sourceType: "url",
|
|
271250
271573
|
id: generateId(),
|
|
271251
|
-
url: annotation.url,
|
|
271252
|
-
title: annotation.title
|
|
271574
|
+
url: annotation.url_citation.url,
|
|
271575
|
+
title: annotation.url_citation.title
|
|
271253
271576
|
});
|
|
271254
271577
|
}
|
|
271255
271578
|
}
|
|
@@ -271271,42 +271594,6 @@ var OpenAIChatLanguageModel = class {
|
|
|
271271
271594
|
};
|
|
271272
271595
|
}
|
|
271273
271596
|
};
|
|
271274
|
-
function isReasoningModel(modelId) {
|
|
271275
|
-
return (modelId.startsWith("o") || modelId.startsWith("gpt-5")) && !modelId.startsWith("gpt-5-chat");
|
|
271276
|
-
}
|
|
271277
|
-
function supportsFlexProcessing(modelId) {
|
|
271278
|
-
return modelId.startsWith("o3") || modelId.startsWith("o4-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-chat");
|
|
271279
|
-
}
|
|
271280
|
-
function supportsPriorityProcessing(modelId) {
|
|
271281
|
-
return modelId.startsWith("gpt-4") || modelId.startsWith("gpt-5-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-nano") && !modelId.startsWith("gpt-5-chat") || modelId.startsWith("o3") || modelId.startsWith("o4-mini");
|
|
271282
|
-
}
|
|
271283
|
-
function getSystemMessageMode(modelId) {
|
|
271284
|
-
var _a16, _b9;
|
|
271285
|
-
if (!isReasoningModel(modelId)) {
|
|
271286
|
-
return "system";
|
|
271287
|
-
}
|
|
271288
|
-
return (_b9 = (_a16 = reasoningModels[modelId]) == null ? undefined : _a16.systemMessageMode) != null ? _b9 : "developer";
|
|
271289
|
-
}
|
|
271290
|
-
var reasoningModels = {
|
|
271291
|
-
o3: {
|
|
271292
|
-
systemMessageMode: "developer"
|
|
271293
|
-
},
|
|
271294
|
-
"o3-2025-04-16": {
|
|
271295
|
-
systemMessageMode: "developer"
|
|
271296
|
-
},
|
|
271297
|
-
"o3-mini": {
|
|
271298
|
-
systemMessageMode: "developer"
|
|
271299
|
-
},
|
|
271300
|
-
"o3-mini-2025-01-31": {
|
|
271301
|
-
systemMessageMode: "developer"
|
|
271302
|
-
},
|
|
271303
|
-
"o4-mini": {
|
|
271304
|
-
systemMessageMode: "developer"
|
|
271305
|
-
},
|
|
271306
|
-
"o4-mini-2025-04-16": {
|
|
271307
|
-
systemMessageMode: "developer"
|
|
271308
|
-
}
|
|
271309
|
-
};
|
|
271310
271597
|
function convertToOpenAICompletionPrompt({
|
|
271311
271598
|
prompt,
|
|
271312
271599
|
user = "user",
|
|
@@ -271874,8 +272161,8 @@ var codeInterpreter = (args = {}) => {
|
|
|
271874
272161
|
};
|
|
271875
272162
|
var comparisonFilterSchema = exports_external3.object({
|
|
271876
272163
|
key: exports_external3.string(),
|
|
271877
|
-
type: exports_external3.enum(["eq", "ne", "gt", "gte", "lt", "lte"]),
|
|
271878
|
-
value: exports_external3.union([exports_external3.string(), exports_external3.number(), exports_external3.boolean()])
|
|
272164
|
+
type: exports_external3.enum(["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]),
|
|
272165
|
+
value: exports_external3.union([exports_external3.string(), exports_external3.number(), exports_external3.boolean(), exports_external3.array(exports_external3.string())])
|
|
271879
272166
|
});
|
|
271880
272167
|
var compoundFilterSchema = exports_external3.object({
|
|
271881
272168
|
type: exports_external3.enum(["and", "or"]),
|
|
@@ -271973,7 +272260,7 @@ var webSearchOutputSchema = lazySchema(() => zodSchema(exports_external3.object(
|
|
|
271973
272260
|
url: exports_external3.string().nullish()
|
|
271974
272261
|
}),
|
|
271975
272262
|
exports_external3.object({
|
|
271976
|
-
type: exports_external3.literal("
|
|
272263
|
+
type: exports_external3.literal("findInPage"),
|
|
271977
272264
|
url: exports_external3.string().nullish(),
|
|
271978
272265
|
pattern: exports_external3.string().nullish()
|
|
271979
272266
|
})
|
|
@@ -272012,7 +272299,7 @@ var webSearchPreviewOutputSchema = lazySchema(() => zodSchema(exports_external3.
|
|
|
272012
272299
|
url: exports_external3.string().nullish()
|
|
272013
272300
|
}),
|
|
272014
272301
|
exports_external3.object({
|
|
272015
|
-
type: exports_external3.literal("
|
|
272302
|
+
type: exports_external3.literal("findInPage"),
|
|
272016
272303
|
url: exports_external3.string().nullish(),
|
|
272017
272304
|
pattern: exports_external3.string().nullish()
|
|
272018
272305
|
})
|
|
@@ -272465,7 +272752,7 @@ var openaiResponsesChunkSchema = lazyValidator(() => zodSchema(exports_external3
|
|
|
272465
272752
|
url: exports_external3.string().nullish()
|
|
272466
272753
|
}),
|
|
272467
272754
|
exports_external3.object({
|
|
272468
|
-
type: exports_external3.literal("
|
|
272755
|
+
type: exports_external3.literal("find_in_page"),
|
|
272469
272756
|
url: exports_external3.string().nullish(),
|
|
272470
272757
|
pattern: exports_external3.string().nullish()
|
|
272471
272758
|
})
|
|
@@ -272657,7 +272944,7 @@ var openaiResponsesResponseSchema = lazyValidator(() => zodSchema(exports_extern
|
|
|
272657
272944
|
url: exports_external3.string().nullish()
|
|
272658
272945
|
}),
|
|
272659
272946
|
exports_external3.object({
|
|
272660
|
-
type: exports_external3.literal("
|
|
272947
|
+
type: exports_external3.literal("find_in_page"),
|
|
272661
272948
|
url: exports_external3.string().nullish(),
|
|
272662
272949
|
pattern: exports_external3.string().nullish()
|
|
272663
272950
|
})
|
|
@@ -272762,7 +273049,11 @@ var openaiResponsesReasoningModelIds = [
|
|
|
272762
273049
|
"gpt-5.1",
|
|
272763
273050
|
"gpt-5.1-chat-latest",
|
|
272764
273051
|
"gpt-5.1-codex-mini",
|
|
272765
|
-
"gpt-5.1-codex"
|
|
273052
|
+
"gpt-5.1-codex",
|
|
273053
|
+
"gpt-5.1-codex-max",
|
|
273054
|
+
"gpt-5.2",
|
|
273055
|
+
"gpt-5.2-chat-latest",
|
|
273056
|
+
"gpt-5.2-pro"
|
|
272766
273057
|
];
|
|
272767
273058
|
var openaiResponsesModelIds = [
|
|
272768
273059
|
"gpt-4.1",
|
|
@@ -272836,22 +273127,22 @@ async function prepareResponsesTools({
|
|
|
272836
273127
|
return { tools: undefined, toolChoice: undefined, toolWarnings };
|
|
272837
273128
|
}
|
|
272838
273129
|
const openaiTools2 = [];
|
|
272839
|
-
for (const
|
|
272840
|
-
switch (
|
|
273130
|
+
for (const tool4 of tools) {
|
|
273131
|
+
switch (tool4.type) {
|
|
272841
273132
|
case "function":
|
|
272842
273133
|
openaiTools2.push({
|
|
272843
273134
|
type: "function",
|
|
272844
|
-
name:
|
|
272845
|
-
description:
|
|
272846
|
-
parameters:
|
|
273135
|
+
name: tool4.name,
|
|
273136
|
+
description: tool4.description,
|
|
273137
|
+
parameters: tool4.inputSchema,
|
|
272847
273138
|
strict: strictJsonSchema
|
|
272848
273139
|
});
|
|
272849
273140
|
break;
|
|
272850
273141
|
case "provider-defined": {
|
|
272851
|
-
switch (
|
|
273142
|
+
switch (tool4.id) {
|
|
272852
273143
|
case "openai.file_search": {
|
|
272853
273144
|
const args = await validateTypes({
|
|
272854
|
-
value:
|
|
273145
|
+
value: tool4.args,
|
|
272855
273146
|
schema: fileSearchArgsSchema
|
|
272856
273147
|
});
|
|
272857
273148
|
openaiTools2.push({
|
|
@@ -272874,7 +273165,7 @@ async function prepareResponsesTools({
|
|
|
272874
273165
|
}
|
|
272875
273166
|
case "openai.web_search_preview": {
|
|
272876
273167
|
const args = await validateTypes({
|
|
272877
|
-
value:
|
|
273168
|
+
value: tool4.args,
|
|
272878
273169
|
schema: webSearchPreviewArgsSchema
|
|
272879
273170
|
});
|
|
272880
273171
|
openaiTools2.push({
|
|
@@ -272886,7 +273177,7 @@ async function prepareResponsesTools({
|
|
|
272886
273177
|
}
|
|
272887
273178
|
case "openai.web_search": {
|
|
272888
273179
|
const args = await validateTypes({
|
|
272889
|
-
value:
|
|
273180
|
+
value: tool4.args,
|
|
272890
273181
|
schema: webSearchArgsSchema
|
|
272891
273182
|
});
|
|
272892
273183
|
openaiTools2.push({
|
|
@@ -272900,7 +273191,7 @@ async function prepareResponsesTools({
|
|
|
272900
273191
|
}
|
|
272901
273192
|
case "openai.code_interpreter": {
|
|
272902
273193
|
const args = await validateTypes({
|
|
272903
|
-
value:
|
|
273194
|
+
value: tool4.args,
|
|
272904
273195
|
schema: codeInterpreterArgsSchema
|
|
272905
273196
|
});
|
|
272906
273197
|
openaiTools2.push({
|
|
@@ -272911,7 +273202,7 @@ async function prepareResponsesTools({
|
|
|
272911
273202
|
}
|
|
272912
273203
|
case "openai.image_generation": {
|
|
272913
273204
|
const args = await validateTypes({
|
|
272914
|
-
value:
|
|
273205
|
+
value: tool4.args,
|
|
272915
273206
|
schema: imageGenerationArgsSchema
|
|
272916
273207
|
});
|
|
272917
273208
|
openaiTools2.push({
|
|
@@ -272935,7 +273226,7 @@ async function prepareResponsesTools({
|
|
|
272935
273226
|
break;
|
|
272936
273227
|
}
|
|
272937
273228
|
default:
|
|
272938
|
-
toolWarnings.push({ type: "unsupported-tool", tool:
|
|
273229
|
+
toolWarnings.push({ type: "unsupported-tool", tool: tool4 });
|
|
272939
273230
|
break;
|
|
272940
273231
|
}
|
|
272941
273232
|
}
|
|
@@ -272992,7 +273283,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
272992
273283
|
}) {
|
|
272993
273284
|
var _a16, _b9, _c, _d;
|
|
272994
273285
|
const warnings = [];
|
|
272995
|
-
const
|
|
273286
|
+
const modelCapabilities = getOpenAILanguageModelCapabilities(this.modelId);
|
|
272996
273287
|
if (topK != null) {
|
|
272997
273288
|
warnings.push({ type: "unsupported-setting", setting: "topK" });
|
|
272998
273289
|
}
|
|
@@ -273028,7 +273319,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
273028
273319
|
}
|
|
273029
273320
|
const { input, warnings: inputWarnings } = await convertToOpenAIResponsesInput({
|
|
273030
273321
|
prompt,
|
|
273031
|
-
systemMessageMode:
|
|
273322
|
+
systemMessageMode: modelCapabilities.systemMessageMode,
|
|
273032
273323
|
fileIdPrefixes: this.config.fileIdPrefixes,
|
|
273033
273324
|
store: (_a16 = openaiOptions == null ? undefined : openaiOptions.store) != null ? _a16 : true,
|
|
273034
273325
|
hasLocalShellTool: hasOpenAITool("openai.local_shell")
|
|
@@ -273044,13 +273335,13 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
273044
273335
|
}
|
|
273045
273336
|
}
|
|
273046
273337
|
function hasOpenAITool(id) {
|
|
273047
|
-
return (tools == null ? undefined : tools.find((
|
|
273338
|
+
return (tools == null ? undefined : tools.find((tool4) => tool4.type === "provider-defined" && tool4.id === id)) != null;
|
|
273048
273339
|
}
|
|
273049
273340
|
const topLogprobs = typeof (openaiOptions == null ? undefined : openaiOptions.logprobs) === "number" ? openaiOptions == null ? undefined : openaiOptions.logprobs : (openaiOptions == null ? undefined : openaiOptions.logprobs) === true ? TOP_LOGPROBS_MAX : undefined;
|
|
273050
273341
|
if (topLogprobs) {
|
|
273051
273342
|
addInclude("message.output_text.logprobs");
|
|
273052
273343
|
}
|
|
273053
|
-
const webSearchToolName = (_c = tools == null ? undefined : tools.find((
|
|
273344
|
+
const webSearchToolName = (_c = tools == null ? undefined : tools.find((tool4) => tool4.type === "provider-defined" && (tool4.id === "openai.web_search" || tool4.id === "openai.web_search_preview"))) == null ? undefined : _c.name;
|
|
273054
273345
|
if (webSearchToolName) {
|
|
273055
273346
|
addInclude("web_search_call.action.sources");
|
|
273056
273347
|
}
|
|
@@ -273058,7 +273349,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
273058
273349
|
addInclude("code_interpreter_call.outputs");
|
|
273059
273350
|
}
|
|
273060
273351
|
const store = openaiOptions == null ? undefined : openaiOptions.store;
|
|
273061
|
-
if (store === false &&
|
|
273352
|
+
if (store === false && modelCapabilities.isReasoningModel) {
|
|
273062
273353
|
addInclude("reasoning.encrypted_content");
|
|
273063
273354
|
}
|
|
273064
273355
|
const baseArgs = {
|
|
@@ -273098,7 +273389,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
273098
273389
|
safety_identifier: openaiOptions == null ? undefined : openaiOptions.safetyIdentifier,
|
|
273099
273390
|
top_logprobs: topLogprobs,
|
|
273100
273391
|
truncation: openaiOptions == null ? undefined : openaiOptions.truncation,
|
|
273101
|
-
...
|
|
273392
|
+
...modelCapabilities.isReasoningModel && ((openaiOptions == null ? undefined : openaiOptions.reasoningEffort) != null || (openaiOptions == null ? undefined : openaiOptions.reasoningSummary) != null) && {
|
|
273102
273393
|
reasoning: {
|
|
273103
273394
|
...(openaiOptions == null ? undefined : openaiOptions.reasoningEffort) != null && {
|
|
273104
273395
|
effort: openaiOptions.reasoningEffort
|
|
@@ -273109,22 +273400,24 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
273109
273400
|
}
|
|
273110
273401
|
}
|
|
273111
273402
|
};
|
|
273112
|
-
if (
|
|
273113
|
-
if (
|
|
273114
|
-
baseArgs.temperature
|
|
273115
|
-
|
|
273116
|
-
|
|
273117
|
-
|
|
273118
|
-
|
|
273119
|
-
|
|
273120
|
-
|
|
273121
|
-
|
|
273122
|
-
baseArgs.top_p
|
|
273123
|
-
|
|
273124
|
-
|
|
273125
|
-
|
|
273126
|
-
|
|
273127
|
-
|
|
273403
|
+
if (modelCapabilities.isReasoningModel) {
|
|
273404
|
+
if (!((openaiOptions == null ? undefined : openaiOptions.reasoningEffort) === "none" && modelCapabilities.supportsNonReasoningParameters)) {
|
|
273405
|
+
if (baseArgs.temperature != null) {
|
|
273406
|
+
baseArgs.temperature = undefined;
|
|
273407
|
+
warnings.push({
|
|
273408
|
+
type: "unsupported-setting",
|
|
273409
|
+
setting: "temperature",
|
|
273410
|
+
details: "temperature is not supported for reasoning models"
|
|
273411
|
+
});
|
|
273412
|
+
}
|
|
273413
|
+
if (baseArgs.top_p != null) {
|
|
273414
|
+
baseArgs.top_p = undefined;
|
|
273415
|
+
warnings.push({
|
|
273416
|
+
type: "unsupported-setting",
|
|
273417
|
+
setting: "topP",
|
|
273418
|
+
details: "topP is not supported for reasoning models"
|
|
273419
|
+
});
|
|
273420
|
+
}
|
|
273128
273421
|
}
|
|
273129
273422
|
} else {
|
|
273130
273423
|
if ((openaiOptions == null ? undefined : openaiOptions.reasoningEffort) != null) {
|
|
@@ -273142,7 +273435,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
273142
273435
|
});
|
|
273143
273436
|
}
|
|
273144
273437
|
}
|
|
273145
|
-
if ((openaiOptions == null ? undefined : openaiOptions.serviceTier) === "flex" && !
|
|
273438
|
+
if ((openaiOptions == null ? undefined : openaiOptions.serviceTier) === "flex" && !modelCapabilities.supportsFlexProcessing) {
|
|
273146
273439
|
warnings.push({
|
|
273147
273440
|
type: "unsupported-setting",
|
|
273148
273441
|
setting: "serviceTier",
|
|
@@ -273150,7 +273443,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
273150
273443
|
});
|
|
273151
273444
|
delete baseArgs.service_tier;
|
|
273152
273445
|
}
|
|
273153
|
-
if ((openaiOptions == null ? undefined : openaiOptions.serviceTier) === "priority" && !
|
|
273446
|
+
if ((openaiOptions == null ? undefined : openaiOptions.serviceTier) === "priority" && !modelCapabilities.supportsPriorityProcessing) {
|
|
273154
273447
|
warnings.push({
|
|
273155
273448
|
type: "unsupported-setting",
|
|
273156
273449
|
setting: "serviceTier",
|
|
@@ -273993,32 +274286,6 @@ function isResponseAnnotationAddedChunk(chunk) {
|
|
|
273993
274286
|
function isErrorChunk(chunk) {
|
|
273994
274287
|
return chunk.type === "error";
|
|
273995
274288
|
}
|
|
273996
|
-
function getResponsesModelConfig(modelId) {
|
|
273997
|
-
const supportsFlexProcessing2 = modelId.startsWith("o3") || modelId.startsWith("o4-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-chat");
|
|
273998
|
-
const supportsPriorityProcessing2 = modelId.startsWith("gpt-4") || modelId.startsWith("gpt-5-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-nano") && !modelId.startsWith("gpt-5-chat") || modelId.startsWith("o3") || modelId.startsWith("o4-mini");
|
|
273999
|
-
const defaults3 = {
|
|
274000
|
-
systemMessageMode: "system",
|
|
274001
|
-
supportsFlexProcessing: supportsFlexProcessing2,
|
|
274002
|
-
supportsPriorityProcessing: supportsPriorityProcessing2
|
|
274003
|
-
};
|
|
274004
|
-
if (modelId.startsWith("gpt-5-chat")) {
|
|
274005
|
-
return {
|
|
274006
|
-
...defaults3,
|
|
274007
|
-
isReasoningModel: false
|
|
274008
|
-
};
|
|
274009
|
-
}
|
|
274010
|
-
if (modelId.startsWith("o") || modelId.startsWith("gpt-5") || modelId.startsWith("codex-") || modelId.startsWith("computer-use")) {
|
|
274011
|
-
return {
|
|
274012
|
-
...defaults3,
|
|
274013
|
-
isReasoningModel: true,
|
|
274014
|
-
systemMessageMode: "developer"
|
|
274015
|
-
};
|
|
274016
|
-
}
|
|
274017
|
-
return {
|
|
274018
|
-
...defaults3,
|
|
274019
|
-
isReasoningModel: false
|
|
274020
|
-
};
|
|
274021
|
-
}
|
|
274022
274289
|
function mapWebSearchOutput(action) {
|
|
274023
274290
|
var _a16;
|
|
274024
274291
|
switch (action.type) {
|
|
@@ -274029,9 +274296,13 @@ function mapWebSearchOutput(action) {
|
|
|
274029
274296
|
};
|
|
274030
274297
|
case "open_page":
|
|
274031
274298
|
return { action: { type: "openPage", url: action.url } };
|
|
274032
|
-
case "
|
|
274299
|
+
case "find_in_page":
|
|
274033
274300
|
return {
|
|
274034
|
-
action: {
|
|
274301
|
+
action: {
|
|
274302
|
+
type: "findInPage",
|
|
274303
|
+
url: action.url,
|
|
274304
|
+
pattern: action.pattern
|
|
274305
|
+
}
|
|
274035
274306
|
};
|
|
274036
274307
|
}
|
|
274037
274308
|
}
|
|
@@ -274324,7 +274595,7 @@ var OpenAITranscriptionModel = class {
|
|
|
274324
274595
|
};
|
|
274325
274596
|
}
|
|
274326
274597
|
};
|
|
274327
|
-
var VERSION7 = "2.0.
|
|
274598
|
+
var VERSION7 = "2.0.86";
|
|
274328
274599
|
function createOpenAI(options = {}) {
|
|
274329
274600
|
var _a16, _b9;
|
|
274330
274601
|
const baseURL = (_a16 = withoutTrailingSlash(loadOptionalSetting({
|
|
@@ -276021,7 +276292,7 @@ function Ut2(n470) {
|
|
|
276021
276292
|
return e488.normalize(n470);
|
|
276022
276293
|
});
|
|
276023
276294
|
}
|
|
276024
|
-
function
|
|
276295
|
+
function St2() {
|
|
276025
276296
|
return Rt3(function(n470) {
|
|
276026
276297
|
return n470.trim();
|
|
276027
276298
|
});
|
|
@@ -276036,7 +276307,7 @@ function $t2() {
|
|
|
276036
276307
|
return n470.toUpperCase();
|
|
276037
276308
|
});
|
|
276038
276309
|
}
|
|
276039
|
-
var
|
|
276310
|
+
var jt3 = Object.freeze({ __proto__: null, endsWith: At3, gt: wt3, gte: kt3, includes: Ct3, length: It2, lowercase: Et3, lt: gt3, lte: yt3, maxLength: zt2, maxSize: function(n470, e488) {
|
|
276040
276311
|
return new Mn2(b8(b8({ check: "max_size" }, L4(e488)), {}, { maximum: n470 }));
|
|
276041
276312
|
}, mime: function(n470, e488) {
|
|
276042
276313
|
return new ne3(b8({ check: "mime_type", mime: n470 }, L4(e488)));
|
|
@@ -276054,7 +276325,7 @@ var jt2 = Object.freeze({ __proto__: null, endsWith: At3, gt: wt3, gte: kt3, inc
|
|
|
276054
276325
|
return new Qn2(b8({ check: "property", property: n470, schema: e488 }, L4(t480)));
|
|
276055
276326
|
}, regex: Tt2, size: function(n470, e488) {
|
|
276056
276327
|
return new Ln2(b8(b8({ check: "size_equals" }, L4(e488)), {}, { size: n470 }));
|
|
276057
|
-
}, startsWith: Zt2, toLowerCase: Ot3, toUpperCase: $t2, trim:
|
|
276328
|
+
}, startsWith: Zt2, toLowerCase: Ot3, toUpperCase: $t2, trim: St2, uppercase: Pt3 });
|
|
276058
276329
|
var Nt2 = z4("ZodISODateTime", function(n470, e488) {
|
|
276059
276330
|
ge3.init(n470, e488), er2.init(n470, e488);
|
|
276060
276331
|
});
|
|
@@ -276273,31 +276544,31 @@ var Xt2 = z4("_ZodString", function(n470, e488) {
|
|
|
276273
276544
|
ie3.init(n470, e488), Yt2.init(n470, e488);
|
|
276274
276545
|
var i313 = n470._zod.bag;
|
|
276275
276546
|
n470.format = (t480 = i313.format) !== null && t480 !== undefined ? t480 : null, n470.minLength = (r324 = i313.minimum) !== null && r324 !== undefined ? r324 : null, n470.maxLength = (o236 = i313.maximum) !== null && o236 !== undefined ? o236 : null, n470.regex = function() {
|
|
276276
|
-
return n470.check(Tt2.apply(
|
|
276547
|
+
return n470.check(Tt2.apply(jt3, arguments));
|
|
276277
276548
|
}, n470.includes = function() {
|
|
276278
|
-
return n470.check(Ct3.apply(
|
|
276549
|
+
return n470.check(Ct3.apply(jt3, arguments));
|
|
276279
276550
|
}, n470.startsWith = function() {
|
|
276280
|
-
return n470.check(Zt2.apply(
|
|
276551
|
+
return n470.check(Zt2.apply(jt3, arguments));
|
|
276281
276552
|
}, n470.endsWith = function() {
|
|
276282
|
-
return n470.check(At3.apply(
|
|
276553
|
+
return n470.check(At3.apply(jt3, arguments));
|
|
276283
276554
|
}, n470.min = function() {
|
|
276284
|
-
return n470.check(xt3.apply(
|
|
276555
|
+
return n470.check(xt3.apply(jt3, arguments));
|
|
276285
276556
|
}, n470.max = function() {
|
|
276286
|
-
return n470.check(zt2.apply(
|
|
276557
|
+
return n470.check(zt2.apply(jt3, arguments));
|
|
276287
276558
|
}, n470.length = function() {
|
|
276288
|
-
return n470.check(It2.apply(
|
|
276559
|
+
return n470.check(It2.apply(jt3, arguments));
|
|
276289
276560
|
}, n470.nonempty = function() {
|
|
276290
276561
|
for (var e489 = arguments.length, t481 = new Array(e489), r326 = 0;r326 < e489; r326++)
|
|
276291
276562
|
t481[r326] = arguments[r326];
|
|
276292
|
-
return n470.check(xt3.apply(
|
|
276563
|
+
return n470.check(xt3.apply(jt3, [1].concat(t481)));
|
|
276293
276564
|
}, n470.lowercase = function(e489) {
|
|
276294
276565
|
return n470.check(Et3(e489));
|
|
276295
276566
|
}, n470.uppercase = function(e489) {
|
|
276296
276567
|
return n470.check(Pt3(e489));
|
|
276297
276568
|
}, n470.trim = function() {
|
|
276298
|
-
return n470.check(
|
|
276569
|
+
return n470.check(St2());
|
|
276299
276570
|
}, n470.normalize = function() {
|
|
276300
|
-
return n470.check(Ut2.apply(
|
|
276571
|
+
return n470.check(Ut2.apply(jt3, arguments));
|
|
276301
276572
|
}, n470.toLowerCase = function() {
|
|
276302
276573
|
return n470.check(Ot3());
|
|
276303
276574
|
}, n470.toUpperCase = function() {
|