Skip to content

Commit 1e2dbc0

Browse files
Version Packages (#12006)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @ai-sdk/xai@3.0.34 ### Patch Changes - 648c8f3: fix(xai): make usage nullable in responses schema for streaming compatibility xAI sends `usage: null` in early streaming events (`response.created`, `response.in_progress`) because token counts aren't available until the stream completes. This change makes the `usage` field nullish in `xaiResponsesResponseSchema` to accept these values without validation errors. Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
1 parent 648c8f3 commit 1e2dbc0

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

.changeset/four-days-relate.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

examples/next-openai/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@ai-sdk/react": "3.0.51",
2727
"@ai-sdk/rsc": "2.0.49",
2828
"@ai-sdk/valibot": "2.0.10",
29-
"@ai-sdk/xai": "3.0.33",
29+
"@ai-sdk/xai": "3.0.34",
3030
"@modelcontextprotocol/sdk": "^1.10.2",
3131
"@radix-ui/react-collapsible": "^1.1.12",
3232
"@radix-ui/react-use-controllable-state": "^1.2.2",

packages/xai/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @ai-sdk/xai
22

3+
## 3.0.34
4+
5+
### Patch Changes
6+
7+
- 648c8f3: fix(xai): make usage nullable in responses schema for streaming compatibility
8+
9+
xAI sends `usage: null` in early streaming events (`response.created`, `response.in_progress`) because token counts aren't available until the stream completes. This change makes the `usage` field nullish in `xaiResponsesResponseSchema` to accept these values without validation errors.
10+
311
## 3.0.33
412

513
### Patch Changes

packages/xai/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ai-sdk/xai",
3-
"version": "3.0.33",
3+
"version": "3.0.34",
44
"license": "Apache-2.0",
55
"sideEffects": false,
66
"main": "./dist/index.js",

pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)