[KongchangAI]
Productai-sdk xai / @ai-sdk/xai

@ai-sdk/xai

The official provider package in the Vercel AI SDK ecosystem for accessing xAI (Grok) models, implemented on an OpenAI-compatible layer and supporting capabilities such as streaming responses and tool calling.

Core Facts

Timeline (last 90 days)

Oct 28

The changes in version 3.0.146 are: exposing the costInUsdTicks field in the response's provider metadata.

Unverified50%
Oct 28

Version 3.0.146 introduces no API breaking changes and is an incremental capability addition.

Unverified50%
Oct 27

The key commit for this fix is 0eb8de6, with the commit message 'fix(xai): stop emitting each citation twice when streaming responses with web or X search'.

Unverified50%
Oct 27

Developers using @ai-sdk/xai with the Web Search or X Search feature enabled are advised to upgrade to 5.0.32 to eliminate the duplicate citation issue.

Unverified50%
Oct 27

Version 5.0.32 fixes a defect where citations were emitted twice in streaming responses when using the Web Search or X Search feature.

Unverified50%
Oct 27

After the fix, each citation is sent only once, making the citation list in streaming output match expectations.

Unverified50%
Oct 24

Upgrading to 5.0.30 is a low-risk operation, with no API signature changes or deprecation warnings, and existing code requires no modification.

Unverified50%
Oct 24

The 5.0.x series has already accumulated a considerable number of patches, and teams accustomed to planning upgrades by major version need to establish an automated dependency inspection mechanism.

Unverified50%
Oct 24

Applications that are using the xai provider to call Grok-series models and that also integrate multiple AI SDK providers in the same project should follow up on this release the most.

Unverified50%
Oct 24

Version 3.0.40 contains documentation maintenance commit e729d58, which updates README.md to unify formatting and avoid duplicate content.

Partially Verified90%

40 more timeline events

All Facts (20)

Verified

@ai-sdk/xai is the adapter-layer provider package in the AI SDK targeting the xAI Grok series of models.

90%
Verified

xAI provides an OpenAI-compatible API interface, which was the basis for early @ai-sdk/xai being able to adapt via the Chat Completions endpoint.

90%
Verified

@ai-sdk/zai is the official Provider in the Vercel AI SDK for Zhipu AI models.

90%
Verified

xAI's Grok series models follow OpenAI's interface specification in API design.

85%
Verified

@ai-sdk/xai@3.0.134 was automatically built by GitHub Actions.

80%
Verified

It is recommended to upgrade related @ai-sdk/* packages as a group, since provider-utils has been synchronized to 5.0.49.

75%
Verified

Patch version upgrades generally do not require modifications to existing business code, but it is recommended to run integration tests after upgrading to confirm dependency version compatibility.

75%
Verified

@ai-sdk/xai@5.0.5 was automatically published by github-actions and belongs to Patch Changes (patch-level update).

75%
Verified

It is recommended to run the full test suite after upgrading, especially when the project simultaneously locks the versions of related dependencies such as ai and @ai-sdk/provider.

75%
Verified

Developers using the AI SDK to integrate xAI models and who have defined tools or structured output schemas with strict property constraints are advised to upgrade to 4.0.59.

75%
Verified

It is recommended to run existing test cases after upgrading to confirm that streaming output and message handling logic work correctly.

75%
Verified

Due to version linkage among AI SDK packages, it is recommended to keep @ai-sdk/provider, @ai-sdk/provider-utils, and the voyage package within compatible version ranges.

75%
Verified

When upgrading @ai-sdk/xai, it is recommended to also update the associated @ai-sdk/provider and @ai-sdk/provider-utils dependencies to ensure consistency.

75%
Verified

The @ai-sdk/xai adapter is specifically designed to interface with xAI's Grok series models.

75%
Verified

This version follows the PATCH update strategy in Semantic Versioning, introducing no breaking changes and remaining backward compatible.

75%
Verified

Patch versions follow the Semantic Versioning (SemVer) specification and should theoretically not introduce breaking changes.

75%
Verified

This dependency update is associated with commit 9942196.

75%
Verified

Patch version updates are generally backward compatible and can be upgraded via npm update @ai-sdk/zai or the equivalent package manager command.

75%
Verified

@ai-sdk/xai 5.0.23 is a patch-level release containing 2 commits, automatically released by github-actions.

75%
Verified

The @ai-sdk/zai package released version 3.0.8, which is a patch change.

90%

Source Articles