@ai-sdk/xai 3.0.5 → 3.0.7
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 +12 -0
- package/dist/index.js +6 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -149,8 +149,8 @@ function convertXaiChatUsage(usage) {
|
|
|
149
149
|
cacheWrite: void 0
|
|
150
150
|
},
|
|
151
151
|
outputTokens: {
|
|
152
|
-
total: usage.completion_tokens
|
|
153
|
-
text: usage.completion_tokens,
|
|
152
|
+
total: usage.completion_tokens,
|
|
153
|
+
text: usage.completion_tokens - reasoningTokens,
|
|
154
154
|
reasoning: reasoningTokens
|
|
155
155
|
},
|
|
156
156
|
raw: usage
|
|
@@ -1434,11 +1434,9 @@ async function prepareResponsesTools({
|
|
|
1434
1434
|
} else {
|
|
1435
1435
|
xaiTools2.push({
|
|
1436
1436
|
type: "function",
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
parameters: tool.inputSchema
|
|
1441
|
-
}
|
|
1437
|
+
name: tool.name,
|
|
1438
|
+
description: tool.description,
|
|
1439
|
+
parameters: tool.inputSchema
|
|
1442
1440
|
});
|
|
1443
1441
|
}
|
|
1444
1442
|
}
|
|
@@ -2047,7 +2045,7 @@ var xaiTools = {
|
|
|
2047
2045
|
};
|
|
2048
2046
|
|
|
2049
2047
|
// src/version.ts
|
|
2050
|
-
var VERSION = true ? "3.0.
|
|
2048
|
+
var VERSION = true ? "3.0.7" : "0.0.0-test";
|
|
2051
2049
|
|
|
2052
2050
|
// src/xai-provider.ts
|
|
2053
2051
|
var xaiErrorStructure = {
|