@ai-sdk/xai 3.0.13 → 3.0.14
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 +5 -5
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1630,11 +1630,12 @@ var XaiResponsesLanguageModel = class {
|
|
|
1630
1630
|
topP,
|
|
1631
1631
|
stopSequences,
|
|
1632
1632
|
seed,
|
|
1633
|
+
responseFormat,
|
|
1633
1634
|
providerOptions,
|
|
1634
1635
|
tools,
|
|
1635
1636
|
toolChoice
|
|
1636
1637
|
}) {
|
|
1637
|
-
var _a, _b, _c, _d;
|
|
1638
|
+
var _a, _b, _c, _d, _e;
|
|
1638
1639
|
const warnings = [];
|
|
1639
1640
|
const options = (_a = await (0, import_provider_utils7.parseProviderOptions)({
|
|
1640
1641
|
provider: "xai",
|
|
@@ -1674,6 +1675,17 @@ var XaiResponsesLanguageModel = class {
|
|
|
1674
1675
|
temperature,
|
|
1675
1676
|
top_p: topP,
|
|
1676
1677
|
seed,
|
|
1678
|
+
...(responseFormat == null ? void 0 : responseFormat.type) === "json" && {
|
|
1679
|
+
text: {
|
|
1680
|
+
format: responseFormat.schema != null ? {
|
|
1681
|
+
type: "json_schema",
|
|
1682
|
+
strict: true,
|
|
1683
|
+
name: (_e = responseFormat.name) != null ? _e : "response",
|
|
1684
|
+
description: responseFormat.description,
|
|
1685
|
+
schema: responseFormat.schema
|
|
1686
|
+
} : { type: "json_object" }
|
|
1687
|
+
}
|
|
1688
|
+
},
|
|
1677
1689
|
...options.reasoningEffort != null && {
|
|
1678
1690
|
reasoning: { effort: options.reasoningEffort }
|
|
1679
1691
|
},
|
|
@@ -2130,7 +2142,7 @@ var xaiTools = {
|
|
|
2130
2142
|
};
|
|
2131
2143
|
|
|
2132
2144
|
// src/version.ts
|
|
2133
|
-
var VERSION = true ? "3.0.
|
|
2145
|
+
var VERSION = true ? "3.0.14" : "0.0.0-test";
|
|
2134
2146
|
|
|
2135
2147
|
// src/xai-provider.ts
|
|
2136
2148
|
var xaiErrorStructure = {
|