ai@7.0.155
Vercel AI SDK 7.0.155 optimizes performance by removing redundant runtime schema validation on inputs already guaranteed by TypeScript types, such as message history.
原始内容为英文;当前页面提供中文导航与来源说明,具体事实请以原文为准。
为什么值得关注
In release ai@7.0.155, Vercel AI SDK removed runtime validation for inputs that are already covered by TypeScript types. Specifically, streamText, generateText, generateObject, and streamObject no longer validate messages against the ModelMessage schema, eliminating performance costs that scaled linearly with message history length during each streamText step. Runtime checks were also removed for call settings, steering messages, tool caller configurations, smoothStream chunking, experimental streamSpeech text input, decide state/question shapes, and batch reference versions. The SDK continues to enforce value constraints that TypeScript cannot express, including integer ranges, non-empty collections, unknown keys, non-finite numbers, and circular references in decide JSON input. Associated internal dependencies were also updated.
可执行摘要
ai@7.0.155 eliminates runtime validation for message schemas (ModelMessage) across streamText, generateText, generateObject, and streamObject, removing linear latency overhead on streamText steps while retaining validation for un-typeable constraints.
- Agent 实用度
- 77/100
- 可信度
- 96%
- 机器格式
- JSON + Markdown
开发者应核对什么
- Verify that callers relying on runtime validation rather than TypeScript guarantees sanitize and validate their message inputs prior to invoking SDK methods.