@ai-sdk/xai 2.0.50 → 2.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1597,11 +1597,12 @@ var XaiResponsesLanguageModel = class {
|
|
|
1597
1597
|
topP,
|
|
1598
1598
|
stopSequences,
|
|
1599
1599
|
seed,
|
|
1600
|
+
responseFormat,
|
|
1600
1601
|
providerOptions,
|
|
1601
1602
|
tools,
|
|
1602
1603
|
toolChoice
|
|
1603
1604
|
}) {
|
|
1604
|
-
var _a, _b, _c, _d;
|
|
1605
|
+
var _a, _b, _c, _d, _e;
|
|
1605
1606
|
const warnings = [];
|
|
1606
1607
|
const options = (_a = await (0, import_provider_utils7.parseProviderOptions)({
|
|
1607
1608
|
provider: "xai",
|
|
@@ -1644,6 +1645,17 @@ var XaiResponsesLanguageModel = class {
|
|
|
1644
1645
|
temperature,
|
|
1645
1646
|
top_p: topP,
|
|
1646
1647
|
seed,
|
|
1648
|
+
...(responseFormat == null ? void 0 : responseFormat.type) === "json" && {
|
|
1649
|
+
text: {
|
|
1650
|
+
format: responseFormat.schema != null ? {
|
|
1651
|
+
type: "json_schema",
|
|
1652
|
+
strict: true,
|
|
1653
|
+
name: (_e = responseFormat.name) != null ? _e : "response",
|
|
1654
|
+
description: responseFormat.description,
|
|
1655
|
+
schema: responseFormat.schema
|
|
1656
|
+
} : { type: "json_object" }
|
|
1657
|
+
}
|
|
1658
|
+
},
|
|
1647
1659
|
...options.reasoningEffort != null && {
|
|
1648
1660
|
reasoning: { effort: options.reasoningEffort }
|
|
1649
1661
|
},
|
|
@@ -2108,7 +2120,7 @@ var xaiTools = {
|
|
|
2108
2120
|
};
|
|
2109
2121
|
|
|
2110
2122
|
// src/version.ts
|
|
2111
|
-
var VERSION = true ? "2.0.
|
|
2123
|
+
var VERSION = true ? "2.0.51" : "0.0.0-test";
|
|
2112
2124
|
|
|
2113
2125
|
// src/xai-provider.ts
|
|
2114
2126
|
var xaiErrorStructure = {
|