Bump to AI SDK v7 - #11
Merged
Merged
Conversation
- ai ^7, @ai-sdk/anthropic ^4, aieo ^0.2.0 (peer + dev); node >=22 - v7's result.response is final-step only: chat persistence, agent returnMessages and nudge continuations now read responseMessages (chat history would otherwise drop every tool call but the last step's) - per-step response.messages in v7 also fixes duplicated history in the stream-resume bank (v6 made them cumulative) - totalUsage -> usage, stepCountIs -> isStepCount, onStepFinish/onFinish -> onStepEnd/onEnd, fullStream -> stream - llm step: generateObject -> generateText + Output.object - severed-stream log shows the root cause v7 now wraps; resume-limit test matches 'terminated' on the cause chain yarn.lock needs a refresh once aieo@0.2.0 is published. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Evanfeenstra
added a commit
to stakwork/stakgraph
that referenced
this pull request
Sep 18, 2026
* aieo 0.2.0: ai-sdk v7 - peer ai ^7; providers @ai-sdk/anthropic/openai/google 4, xai 5, @openrouter/ai-sdk-provider 3; node >=22 - ESM-only build (ai v7 dropped CommonJS); drop stale module field - callModel: system -> instructions, fullStream -> stream - callGenerateObject: generateObject -> generateText + Output.object - store: crypto.randomUUID() instead of the undeclared (hoisted) uuid - skipLibCheck: ai v7 typings reference DOM types mcp itself is not migrated yet (still pins @ai-sdk v3 via resolutions and imports aieo src directly) — don't merge until it is. Co-Authored-By: Claude <noreply@anthropic.com> * mcp: ai-sdk v7 - ai 7.0.105, @ai-sdk/anthropic 4, @ai-sdk/mcp 2, @ai-sdk/provider 4, @openrouter/ai-sdk-provider 3, zod 4.6.5; gitsee/agent pinned to match - drop the global ai/@ai-sdk resolutions: they forced ai 6 onto stagehand (declares ai 5) and gitsee, which now get their own nested copies. mcp/aieo/gitsee-agent/strut/MCP SDK still share one root ai + zod (#1682) - strut -> stakwork/strut#11 merge (eda56a5), the v7 build - v7 makes step.response.messages per-step and result.response final-step only: extractMessagesFromSteps now concatenates every step (sessions were about to keep only the last step -> orphaned tool_use on replay); repo/agent + gitsee lab read responseMessages - new extract-messages-from-steps test runs a real 2-step loop on the v7 mock model; toolsJarvis recovery mirror updated to per-step semantics - mcpServers: LanguageModelV4ToolResultOutput Co-Authored-By: Claude <noreply@anthropic.com> * ci: node 22 (ai-sdk v7 + strut require it; matches mcp/Dockerfile) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves strut to
ai7,@ai-sdk/anthropic4 andaieo0.2.0 (the v7 build of aieo). Node 22+ is now required, which the Dockerfile already uses.The change that matters
In v7,
result.responsecovers only the final step. Every step's messages now live in the newresult.responseMessages. Strut readresponse.messagesin four places. They all still compiled, and they would all have silently lost data:createStrut.ts): every chat turn would have saved only its last step. Tool calls and tool results would have disappeared from stored history.steps/core/agent.ts):returnMessagesand the history passed to both nudge retries.All four now read
responseMessages.v7 also makes each step's
response.messagesper-step. In v6 they were cumulative, so the stream-resume code, which banks messages step by step, replayed duplicated history. That code is now correct as written.Renames
totalUsage→usage, which counts all steps in v7stepCountIs→isStepCountonStepFinish/onFinish→onStepEnd/onEndfullStream→streamllmstep:generateObject→generateText+Output.objectTests
APICallErrorwithTypeError: terminatedas the cause). The resume-limit test now looks for "terminated" anywhere in the cause chain, and the "stream severed" log line shows the root cause.npm test: 813/813 pass.llmstep works, and a 2-step agent run returned all 4 messages with no duplicated tool calls.Rollout
ai-sdk-v7branch. Until then, mcp stays on the v6 strut.