unstale

npm / @ai-sdk/xai

@ai-sdk/xai

What changed in @ai-sdk/xai 4 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

3 breaking1 security10 new APIs and options4 behavior and defaults6 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

@ai-sdk/xai 521 changes

Breaking changes 2

  • Together AI Gemini image inputs are marked unsupported by the current single-image request mapping.

    5.0.11release notes

  • The Chat Completions API was removed.

    5.0.0release notes

Security 1

  • @ai-sdk/provider-utils has an Uncontrolled Resource Consumption issue

    5.0.1security advisory

New APIs and options 9

Behavior and default changes 4

  • The xSearch tool now allows up to 20 allowedXHandles.

    5.0.18release notes

  • The xSearch tool now allows up to 20 excludedXHandles.

    5.0.18release notes

  • Asynchronous capability lookups can resolve to unknown.

    5.0.11release notes

  • Middleware overrides can resolve capability lookups to unknown.

    5.0.11release notes

Fixes and other changes 5

  • Speaker diarization is preserved when available or reported as unavailable, avoiding silent loss of diarization information.

    5.0.16release notes

  • The User-Agent header is now standards-compliant.

    5.0.12release notes

  • QuiverAI Arrow 2 and Arrow 2 Telos are advertised as supporting file input.

    5.0.11release notes

  • Capability declarations use confirmed model IDs, leaving unrecognized model names unknown.

    5.0.11release notes

  • Together AI FLUX.2 Pro and Flex are advertised as supporting single-image editing.

    5.0.11release notes

@ai-sdk/xai 43 changes

Breaking changes 1

  • Unsupported batch request types are now rejected.

    4.0.58release notes

New APIs and options 1

  • Image generation requests are now supported in batches.

    4.0.58release notes

Fixes and other changes 1