Upgrading a 55-line AI SDK 6 app to version 7.0.148 left 4 TypeScript errors, the official codemod cut them to 1, and one manual fix brought them to 0.
A tool still threw a TypeError after the codemod because experimental_context became a per-tool context fed by toolsContext, and result.usage rose from 150 to 250 input tokens, 67 percent more,
A stored chat history starting with a system message threw AI_InvalidPromptError on version 7, so move it to instructions, require Node 22 or later, and replay a recorded conversation before