@ai-sdk/xai 0.0.0-64aae7dd-20260114144918 → 0.0.0-98261322-20260122142521
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 +64 -5
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/docs/01-xai.mdx +697 -0
- package/package.json +11 -6
- package/src/convert-to-xai-chat-messages.test.ts +243 -0
- package/src/convert-to-xai-chat-messages.ts +142 -0
- package/src/convert-xai-chat-usage.test.ts +240 -0
- package/src/convert-xai-chat-usage.ts +23 -0
- package/src/get-response-metadata.ts +19 -0
- package/src/index.ts +14 -0
- package/src/map-xai-finish-reason.ts +19 -0
- package/src/responses/__fixtures__/xai-code-execution-tool.1.json +68 -0
- package/src/responses/__fixtures__/xai-text-streaming.1.chunks.txt +698 -0
- package/src/responses/__fixtures__/xai-text-with-reasoning-streaming-store-false.1.chunks.txt +655 -0
- package/src/responses/__fixtures__/xai-text-with-reasoning-streaming.1.chunks.txt +679 -0
- package/src/responses/__fixtures__/xai-web-search-tool.1.chunks.txt +274 -0
- package/src/responses/__fixtures__/xai-web-search-tool.1.json +90 -0
- package/src/responses/__fixtures__/xai-x-search-tool.1.json +149 -0
- package/src/responses/__fixtures__/xai-x-search-tool.chunks.txt +1757 -0
- package/src/responses/__snapshots__/xai-responses-language-model.test.ts.snap +21929 -0
- package/src/responses/convert-to-xai-responses-input.test.ts +463 -0
- package/src/responses/convert-to-xai-responses-input.ts +206 -0
- package/src/responses/convert-xai-responses-usage.ts +24 -0
- package/src/responses/map-xai-responses-finish-reason.ts +20 -0
- package/src/responses/xai-responses-api.ts +393 -0
- package/src/responses/xai-responses-language-model.test.ts +1803 -0
- package/src/responses/xai-responses-language-model.ts +732 -0
- package/src/responses/xai-responses-options.ts +34 -0
- package/src/responses/xai-responses-prepare-tools.test.ts +497 -0
- package/src/responses/xai-responses-prepare-tools.ts +226 -0
- package/src/tool/code-execution.ts +17 -0
- package/src/tool/index.ts +15 -0
- package/src/tool/view-image.ts +20 -0
- package/src/tool/view-x-video.ts +18 -0
- package/src/tool/web-search.ts +56 -0
- package/src/tool/x-search.ts +63 -0
- package/src/version.ts +6 -0
- package/src/xai-chat-language-model.test.ts +1805 -0
- package/src/xai-chat-language-model.ts +681 -0
- package/src/xai-chat-options.ts +131 -0
- package/src/xai-chat-prompt.ts +44 -0
- package/src/xai-error.ts +19 -0
- package/src/xai-image-settings.ts +1 -0
- package/src/xai-prepare-tools.ts +95 -0
- package/src/xai-provider.test.ts +167 -0
- package/src/xai-provider.ts +162 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,72 @@
|
|
|
1
1
|
# @ai-sdk/xai
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-98261322-20260122142521
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
- 080559b: chore: add docs to package dist
|
|
8
|
+
|
|
9
|
+
## 3.0.30
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 8dc54db: chore: add src folders to package bundle
|
|
14
|
+
- Updated dependencies [8dc54db]
|
|
15
|
+
- @ai-sdk/openai-compatible@2.0.17
|
|
16
|
+
|
|
17
|
+
## 3.0.29
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [78555ad]
|
|
22
|
+
- @ai-sdk/openai-compatible@2.0.16
|
|
23
|
+
|
|
24
|
+
## 3.0.28
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [7116ef3]
|
|
29
|
+
- @ai-sdk/openai-compatible@2.0.15
|
|
30
|
+
|
|
31
|
+
## 3.0.27
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Updated dependencies [1612a57]
|
|
36
|
+
- @ai-sdk/openai-compatible@2.0.14
|
|
37
|
+
|
|
38
|
+
## 3.0.26
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Updated dependencies [5c090e7]
|
|
43
|
+
- @ai-sdk/provider@3.0.4
|
|
44
|
+
- @ai-sdk/openai-compatible@2.0.13
|
|
45
|
+
- @ai-sdk/provider-utils@4.0.8
|
|
46
|
+
|
|
47
|
+
## 3.0.25
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- Updated dependencies [78a133a]
|
|
52
|
+
- @ai-sdk/openai-compatible@2.0.12
|
|
53
|
+
|
|
54
|
+
## 3.0.24
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- Updated dependencies [46f46e4]
|
|
59
|
+
- @ai-sdk/provider-utils@4.0.7
|
|
60
|
+
- @ai-sdk/openai-compatible@2.0.11
|
|
61
|
+
|
|
62
|
+
## 3.0.23
|
|
63
|
+
|
|
64
|
+
### Patch Changes
|
|
65
|
+
|
|
66
|
+
- Updated dependencies [1b11dcb]
|
|
67
|
+
- @ai-sdk/provider-utils@4.0.6
|
|
68
|
+
- @ai-sdk/provider@3.0.3
|
|
69
|
+
- @ai-sdk/openai-compatible@2.0.10
|
|
11
70
|
|
|
12
71
|
## 3.0.22
|
|
13
72
|
|
package/dist/index.js
CHANGED
|
@@ -2201,7 +2201,7 @@ var xaiTools = {
|
|
|
2201
2201
|
};
|
|
2202
2202
|
|
|
2203
2203
|
// src/version.ts
|
|
2204
|
-
var VERSION = true ? "0.0.0-
|
|
2204
|
+
var VERSION = true ? "0.0.0-98261322-20260122142521" : "0.0.0-test";
|
|
2205
2205
|
|
|
2206
2206
|
// src/xai-provider.ts
|
|
2207
2207
|
var xaiErrorStructure = {
|
package/dist/index.mjs
CHANGED
|
@@ -2208,7 +2208,7 @@ var xaiTools = {
|
|
|
2208
2208
|
};
|
|
2209
2209
|
|
|
2210
2210
|
// src/version.ts
|
|
2211
|
-
var VERSION = true ? "0.0.0-
|
|
2211
|
+
var VERSION = true ? "0.0.0-98261322-20260122142521" : "0.0.0-test";
|
|
2212
2212
|
|
|
2213
2213
|
// src/xai-provider.ts
|
|
2214
2214
|
var xaiErrorStructure = {
|