AI SDK 7.0.153 separates full-response history from structured-output parsing
Released October 24, AI SDK 7.0.153 parses only the last final_answer when a non-streaming OpenAI or Azure Responses result contains multiple JSON assistant messages, while preserving full text, annotations, message history and usage.
Why it matters
Generative interfaces often map model JSON into forms, cards or state objects. Concatenating commentary, drafts and a final answer turns individually valid JSON messages into invalid parser input, so a UI can fail even after the model produced a valid final state.
A closer look
The fix covers generateText with Output.object and generateObject, including the built-in JSON and reasoning middleware. Providers can supply structuredOutputText without changing the response content exposed to callers; the OpenAI Responses adapter selects the last phase: final_answer message when present. Tests preserve raw callback text, response metadata, annotations, messages and token usage, while retaining the previous concatenation fallback when no provider-selected parser input exists.
Who this is for
Frontend and agent-platform teams using AI SDK with OpenAI or Azure Responses to render structured model output as generative interfaces
Original sources
- Vercel AI SDK official release and commit ↗github.com
- Structured-output parser fix and tests ↗github.com
Revisions & corrections (1)
— Official 2026-10-24 patch fixes a verified failure mode in non-streaming JSON output used by generative interfaces; release notes and merged tests confirm scope, preserved response data and the unchanged streaming limitation.