•
By Paul Scanlon AI SDK v7 support in Mastra
Mastra supported AI SDK v7 from the day it was released, June 25, 2026. Since then we’ve continued to support and improve the overall end-to-end developer experience.
AI SDK v7 introduced a new provider spec (LanguageModelV4), a top-level reasoning parameter, and a number of API renames. @mastra/core hides the spec differences behind the Agent API and detects the spec to maintain support for v5, v6, and v7. Upgrading your model providers from @ai-sdk/openai@2.x.x (v6) to @ai-sdk/openai@4.x.x (v7) won’t require any Mastra code changes.
Changes have been made to the following Mastra packages:
@mastra/core: Handles the runtime, agent definitions,.stream()/.generate()calls, andmodelSettings.@mastra/ai-sdk: Handles route handlers, stream handlers, and converters that adapt a Mastra agent touseChat,useCompletion, oruseObjecton the frontend.