changelog

Vercel AI SDK Deprecates searchParameters for xAI, Adds Image Search Support

TL;DR

Vercel released AI SDK version 4.0.0-canary.69 with breaking changes to xAI integration. The update deprecates the searchParameters option for xAI live search, replacing it with dedicated web_search and x_search agent tools, and adds image search capability through a new enableImageSearch parameter.

1 min read
0

Vercel released version 4.0.0-canary.69 of its AI SDK's xAI provider package, introducing a deprecation and a new image search feature.

Breaking Change: searchParameters Deprecated

The SDK now deprecates the searchParameters option for xAI live search functionality. Developers must migrate to dedicated agent tools: web_search and x_search. This change affects how developers implement search capabilities in applications using xAI's Grok models through Vercel's AI SDK.

Image Search Support Added

The update adds enableImageSearch support to the xAI Web Search tool. The parameter maps to xAI's native enable_image_search option in the Responses API. Developers can now call xai.tools.webSearch() with the enableImageSearch boolean parameter to include image results in search operations.

The implementation follows xAI's API specification, where the SDK translates camelCase JavaScript conventions to the API's snake_case format automatically.

What This Means

Vercel is standardizing how developers access xAI's search capabilities through its AI SDK by moving from configuration parameters to explicit tool definitions. This aligns with the broader agent tool pattern used across other providers in the SDK. The image search addition expands the types of content xAI models can retrieve during web searches, though adoption will require developers to update their integration code to use the new tool-based approach. The canary release tag indicates this is a pre-release version for early testing.

Comments

Loading...