Vercel AI SDK 发布 @ai-sdk/xai@5.0.16,新增 max 推理等级
原标题:@ai-sdk/xai@5.0.16
AI 摘要
Vercel AI SDK 发布 @ai-sdk/xai@5.0.16 补丁版本,新增可移植的 `max` 推理等级并映射到各原生提供商,同时加入兼容性强制转换与基于预算的回退支持。该变更扩展了 LanguageModelV4CallOptions 的 reasoning 类型,要求第三方提供商处理 `max`,并调整了 Amazon Bedrock 与 Fireworks 的映射行为。此外还升级到 TypeScript 6,并修复 xAI 说话人分离不可用时的保留或上报问题。
正文节选
### Patch Changes - 268225c: feat(provider): add a portable `max` reasoning level with native provider mappings, compatibility coercions, and budget-based fallback support. Compatibility notes: - **TypeScript source compatibility:** Adding `max` widens `LanguageModelV4CallOptions['reasoning']` and the derived `ReasoningLevel` type. Third-party providers and consumers with exhaustive switches or `Record<ReasoningLevel, ...>` mappings must handle `max` before upgrading. Ordinary calls using