AI SDK 7.0.155 removes runtime checks already guaranteed by static types
Released October 27, AI SDK 7.0.155 stops revalidating message history against the ModelMessage schema in text and object generation and removes several shape checks covered by TypeScript, reducing a linear cost in long conversations and multi-step runs.
Why it matters
Generative interfaces and tool agents carry chat, tool and UI state through every step. Rewalking the full message history at runtime grows with that history and repeats on each step, creating local latency outside the model call.
A closer look
streamText, generateText, generateObject and streamObject no longer validate messages against ModelMessage. The release also removes duplicated type checks for call settings, steering messages, tool-caller configuration, smoothStream chunking, streamSpeech text input, decide state and question shapes, and batch version. With 2,201 messages and an instant mocked model, the maintainer commit reports streamText first-step overhead falling from about 74.5 ms to 0.39 ms and an 11-step run from about 456.7 ms to 3.9 ms, while single-message generateText is unchanged. Constraints TypeScript cannot express remain checked, including integer ranges, non-empty collections, unknown keys, and non-finite numbers, cycles or sparse arrays in decide JSON; empty-message and system-message restrictions also remain.
Who this is for
Teams operating long conversations, multi-step tool loops and generative-UI state histories while owning TypeScript and untrusted-data boundaries
Original sources
- Vercel AI SDK official release and implementation commit ↗github.com
- Runtime-validation removal, tests, docs and benchmark ↗github.com
Revisions & corrections (1)
— Official release and implementation commit establish the validation removal, retained constraints, caller migration boundary and maintainer benchmark.