Vercel AI SDK 发布 @ai-sdk/xai 5.0.39 补丁
原标题:@ai-sdk/xai@5.0.39
AI 摘要
Vercel AI SDK 发布 @ai-sdk/xai@5.0.39 补丁版本,为 xAI 提供商实现服务端实时扩展:XaiRealtimeModel 新增 getServerWebSocketConfig(),返回带 model 查询参数的上游语音实时 WebSocket URL 及基于凭据的请求头认证,并拒绝不支持的端点意图。事件映射器在 response-done 和 input-transcription-completed 事件中按 xAI 的 OpenAI 兼容实时协议格式填充规范化 usage。此外还支持转写词级时间戳、视频生成的 output.uploadUrl 类型化交付,并更新了 @ai-sdk/provider 等依赖。
正文节选
### Patch Changes - 892af4d: feat (provider/xai): implement server-side realtime extensions `XaiRealtimeModel` now implements `getServerWebSocketConfig()`, returning the upstream voice realtime WebSocket URL (with the `model` query param) plus header auth derived from the model's configured credentials. Unsupported endpoint intents are rejected. The event mapper now populates normalized `usage` on `response-done` and `input-transcription-completed` using xAI's OpenAI-compatible realtime wire