ai@7.0.138 Adds Shared Citation Representation and Improves Chat Stream Handling
The ai@7.0.138 release introduces an optional shared citation feature in generated text events, fixes chat stream resume logic, and addresses various message and tool output issues.
What changed?
The ai@7.0.138 update introduces several improvements and bug fixes. Most notably, it adds an optional shared citation representation to generated text and text-end stream events. This allows citations to be preserved in both core result content and UI message text parts, including validation and persistence, without altering underlying content structures or stream event types. The release also resolves issues with resuming interrupted chat streams, synchronizes tool outputs with corresponding tool calls, and fixes activation conflicts and message duplication during chat stream replays.
Why does it matter to an everyday developer?
Developers who build chat or document generation experiences on ai-sdk can now confidently support citations in outputs, offering end users clearer source validation and traceability. The citation preservation is integrated at the API and UI levels, making it easier to validate and persist references without custom logic or risk of loss during streaming. The chat stream resume improvements mean developers using long-lived shared Chat instances can prevent duplicate requests and avoid confusing duplicated messages if a session resumes mid-stream.
What can the developer do now?
Developers can update to ai@7.0.138 to use the shared citation feature in generated outputs and take advantage of improved stream handling. For apps that highlight sources, the preserved citations simplify implementation. Developers relying on chat streaming logic should notice fewer errors if streams are interrupted, especially on page visibility changes or component remounts. Review the release notes for full context and consider testing flows that depend on citations, message streaming, and tool integrations after updating.
