@ai-sdk/xai 4.0.3 → 4.0.4

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @ai-sdk/xai
2
2
 
3
+ ## 4.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [8c616f0]
8
+ - @ai-sdk/provider-utils@5.0.3
9
+ - @ai-sdk/openai-compatible@3.0.3
10
+
3
11
  ## 4.0.3
4
12
 
5
13
  ### Patch Changes
package/dist/index.js CHANGED
@@ -3393,7 +3393,7 @@ var xaiTools = {
3393
3393
  };
3394
3394
 
3395
3395
  // src/version.ts
3396
- var VERSION = true ? "4.0.3" : "0.0.0-test";
3396
+ var VERSION = true ? "4.0.4" : "0.0.0-test";
3397
3397
 
3398
3398
  // src/files/xai-files.ts
3399
3399
  import {
package/docs/01-xai.mdx CHANGED
@@ -79,7 +79,12 @@ first argument is the model id, e.g. `grok-4.20-non-reasoning`.
79
79
  const model = xai('grok-4.20-non-reasoning');
80
80
  ```
81
81
 
82
- By default, `xai(modelId)` uses the Responses API. To use the [Chat Completions API](https://docs.x.ai/docs/api-reference#chat-completions) (legacy), use `xai.chat(modelId)`.
82
+ <Note>
83
+ Since AI SDK 7, `xai(modelId)` uses the xAI Responses API by default. To use
84
+ the [Chat Completions
85
+ API](https://docs.x.ai/docs/api-reference#chat-completions) (legacy), use
86
+ `xai.chat(modelId)`.
87
+ </Note>
83
88
 
84
89
  ### Example
85
90
 
@@ -165,7 +170,7 @@ calling pattern.
165
170
 
166
171
  ## Responses API (Agentic Tools)
167
172
 
168
- The xAI Responses API is the default when using `xai(modelId)`. You can also use `xai.responses(modelId)` explicitly. This enables the model to autonomously orchestrate tool calls and research on xAI's servers.
173
+ The xAI Responses API is the default when using `xai(modelId)` (since AI SDK 7). You can also use `xai.responses(modelId)` explicitly. This enables the model to autonomously orchestrate tool calls and research on xAI's servers.
169
174
 
170
175
  ```ts
171
176
  const model = xai.responses('grok-4.20-non-reasoning');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/xai",
3
- "version": "4.0.3",
3
+ "version": "4.0.4",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -29,9 +29,9 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@ai-sdk/openai-compatible": "3.0.2",
32
+ "@ai-sdk/openai-compatible": "3.0.3",
33
33
  "@ai-sdk/provider": "4.0.1",
34
- "@ai-sdk/provider-utils": "5.0.2"
34
+ "@ai-sdk/provider-utils": "5.0.3"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "22.19.19",