---
title: "@ai-sdk/xai Breaking Changes on npm | Since.dev"
description: "What each @ai-sdk/xai release removed, renamed or changed: 50 breaking changes in 3 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/@ai-sdk/xai
last_updated: 2026-09-15
---

# @ai-sdk/xai breaking changes

Every breaking API change we have recorded in @ai-sdk/xai on npm: 50 breaking changes in 3 versions. Below are its newest 3 versions, removals and renames first, each with its source.

Newest change September 15, 2026

## 5.0.0

2 breaking changes, first published September 15, 2026.

- **Removed** `XaiLanguageModelChatOptions`  

XaiLanguageModelChatOptions was removed in @ai-sdk/xai 5.0.0 [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/5.0.0)
- **Removed** `XaiProviderOptions`  

XaiProviderOptions was removed in @ai-sdk/xai 5.0.0 [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/5.0.0)

## 4.0.0

32 breaking changes, first published June 25, 2026.

- **Removed** `XaiFilePartProviderOptions`  

XaiFilePartProviderOptions was removed in @ai-sdk/xai 4.0.0 [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/4.0.0)
- **Signature changed** `codeExecution`  

Was const codeExecution: (args?: Parameters<typeof codeExecutionToolFactory>\[0\]) => \_ai_sdk_provider_utils.Tool<Record<string, never>, {output: string; error?: string | undefined;}>; now const codeExecution: (args?: Parameters<typeof... [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/4.0.0)
- **Signature changed** `mcpServer`  

Was const mcpServer: (args: Parameters<typeof mcpServerToolFactory>\[0\]) => \_ai_sdk_provider_utils.Tool<{}, {name: string; arguments: string; result: unknown;}>; now const mcpServer: (args: Parameters<typeof mcpServerToolFactory>\[0\]) =>... [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/4.0.0)
- **Signature changed** `viewImage`  

Was const viewImage: (args?: Parameters<typeof viewImageToolFactory>\[0\]) => \_ai_sdk_provider_utils.Tool<Record<string, never>, {description: string; objects?: string\[\] | undefined;}>; now const viewImage: (args?: Parameters<typeof... [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/4.0.0)
- **Signature changed** `viewXVideo`  

Was const viewXVideo: (args?: Parameters<typeof viewXVideoToolFactory>\[0\]) => \_ai_sdk_provider_utils.Tool<Record<string, never>, {description: string; transcript?: string | undefined; duration?: number | undefined;}>; now const viewXVideo... [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/4.0.0)
- **Signature changed** `webSearch`  

Was const webSearch: (args?: Parameters<typeof webSearchToolFactory>\[0\]) => \_ai_sdk_provider_utils.Tool<{}, {action?: {type: "search"; query?: string; queries?: string\[\];} | {type: "openPage"; url?: string | null;} | {type: "findInPage"... [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/4.0.0)
- **Signature changed** `XaiErrorData`  

Was type XaiErrorData = InferSchema<typeof xaiErrorDataSchema>; now type XaiErrorData = z.infer<typeof xaiErrorDataSchema>. [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/4.0.0)
- **Signature changed** `XaiImageModelOptions`  

Was type XaiImageModelOptions = InferSchema<typeof xaiImageModelOptions>; now type XaiImageModelOptions = z.infer<typeof xaiImageModelOptions>. [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/4.0.0)
- **Signature changed** `XaiImageProviderOptions`  

Was type XaiImageModelOptions = InferSchema<typeof xaiImageModelOptions>; now type XaiImageModelOptions = z.infer<typeof xaiImageModelOptions>. [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/4.0.0)
- **Signature changed** `XaiLanguageModelChatOptions`  

Was type XaiLanguageModelChatOptions = InferSchema<typeof xaiLanguageModelChatOptions>; now type XaiLanguageModelChatOptions = z.infer<typeof xaiLanguageModelChatOptions>. [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/4.0.0)

And 22 more in this version.

## 3.0.0

16 breaking changes, first published December 22, 2025.

- **Signature changed** `webSearch`  

Was const webSearch: (args?: Parameters<typeof webSearchToolFactory>\[0\]) => \_ai_sdk_provider_utils.Tool<Record<string, never>, {action?: {type: "search"; query?: string; queries?: string\[\];} | {type: "openPage"; url?: string | null;} |... [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/3.0.0)
- **Signature changed** `XaiProvider`  

Was interface XaiProvider extends ProviderV2; now interface XaiProvider extends ProviderV3. [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/3.0.0)
- **Signature changed** `XaiProvider.__call`  

Was (modelId: XaiChatModelId): LanguageModelV2; now (modelId: XaiChatModelId): LanguageModelV3. [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/3.0.0)
- **Signature changed** `XaiProvider.chat`  

Was chat: (modelId: XaiChatModelId) => LanguageModelV2; now chat: (modelId: XaiChatModelId) => LanguageModelV3. [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/3.0.0)
- **Signature changed** `XaiProvider.image`  

Was image(modelId: XaiImageModelId): ImageModelV2; now image(modelId: XaiImageModelId): ImageModelV3. [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/3.0.0)
- **Signature changed** `XaiProvider.imageModel`  

Was imageModel(modelId: XaiImageModelId): ImageModelV2; now imageModel(modelId: XaiImageModelId): ImageModelV3. [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/3.0.0)
- **Signature changed** `XaiProvider.languageModel`  

Was languageModel(modelId: XaiChatModelId): LanguageModelV2; now languageModel(modelId: XaiChatModelId): LanguageModelV3. [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/3.0.0)
- **Signature changed** `XaiProvider.responses`  

Was responses: (modelId: XaiResponsesModelId) => LanguageModelV2; now responses: (modelId: XaiResponsesModelId) => LanguageModelV3. [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/3.0.0)
- **Signature changed** `XaiProvider.tools.codeExecution`  

Was codeExecution: (args?: Parameters<\_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<Record<string, never>, {output: string; error?: string | undefined;}, object>>\[0\]) => \_ai_sdk_provider_utils.Tool<Record<string... [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/3.0.0)
- **Signature changed** `XaiProvider.tools.viewImage`  

Was viewImage: (args?: Parameters<\_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<Record<string, never>, {description: string; objects?: string\[\] | undefined;}, object>>\[0\]) => \_ai_sdk_provider_utils.Tool<Record<string... [npmjs.com](https://www.npmjs.com/package/@ai-sdk/xai/v/3.0.0)

And 6 more in this version.

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version, not only the newest. On Team and up, a fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous management.

Scan a public repository now, or give your agent one line.

### See how out of date your code is.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
