@ai-sdk/xai 5.0.16 Adds Portable 'max' Reasoning Level
The @ai-sdk/xai 5.0.16 release introduces a cross-provider portable 'max' reasoning level, with new TypeScript type support, compatibility handling for Fireworks and Amazon Bedrock, and some migration considerations for exhaustive consumers.
What changed?
The @ai-sdk/xai library now supports a new portable 'max' reasoning level across providers. This update includes native provider mappings, type changes in TypeScript definitions, and compatibility handling for providers such as Amazon Bedrock and Fireworks. Specifically, 'max' is available as a portable value in LanguageModelV4CallOptions['reasoning'] and the derived ReasoningLevel type. Fireworks maps 'max' to 'high' and emits a compatibility warning, similar to previous behavior for 'minimal' and 'xhigh'. For Amazon Bedrock, unsupported 'max' is mapped to 'high' with a warning, and explicit effort/budget overrides no longer emit warnings for skipped portable fields.
Why does it matter to an everyday developer?
Developers can now specify a 'max' reasoning level for large language model calls in a provider-agnostic way, simplifying logic for those targeting multiple providers. The widened TypeScript types improve code expressiveness but require code updates for projects using exhaustive switch or Record mappings on reasoning levels. Some providers translate 'max' into their own supported highest value, providing fallback support while alerting developers to compatibility differences.
What can the developer do now?
Developers should update any exhaustive TypeScript mappings to recognize the new 'max' value before upgrading. For portable LLM applications, developers can now select 'max' as a reasoning level, benefiting from unified handling across providers. Review application logs or returned warnings to ensure that provider-specific fallbacks meet needs, especially when targeting providers such as Fireworks or Amazon Bedrock.
