Skip to content

aieo 0.2.0 + mcp: bump to AI SDK v7 - #1705

Merged
Evanfeenstra merged 3 commits into
mainfrom
ai-sdk-v7
Sep 18, 2026
Merged

Evanfeenstra merged 3 commits into
mainfrom
ai-sdk-v7

Conversation

@Evanfeenstra

Copy link
Copy Markdown
Collaborator

Moves aieo and mcp to ai 7. aieo 0.2.0 is already published from this branch. mcp now pins strut to the v7 merge (stakwork/strut#11, eda56a5).

aieo 0.2.0

  • Requires ai ^7 as a peer. Bundled providers: @ai-sdk/anthropic/openai/google 4, xai 5, @openrouter/ai-sdk-provider 3. Needs Node 22 or later.
  • Builds ESM only, because ai v7 dropped CommonJS.
  • callModel: system → instructions, fullStream → stream. callGenerateObject: generateObject → generateText + Output.object.
  • store.ts uses crypto.randomUUID() in place of uuid. aieo never declared uuid; the import only worked because the monorepo hoisted it.

mcp dependencies

  • ai 7.0.105, @ai-sdk/anthropic 4, @ai-sdk/mcp 2, @ai-sdk/provider 4, zod 4.6.5. gitsee/agent is pinned to the same versions.
  • Removed the global ai/@ai-sdk resolutions. They forced ai 6 onto stagehand (which declares ai 5) and onto gitsee. Those packages now get their own nested copies. mcp, aieo, gitsee-agent, strut and the MCP SDK still share a single root ai and zod, which is what bump strut + aieo 0.1.42: zod / ai as peerDependencies — one copy per process #1682 needs.

The change that matters

In v7, each step's response.messages holds only that step's messages, and a result's response covers only the final step. Code that relied on the v6 behavior still compiled, and it would have lost data at runtime:

  • extractMessagesFromSteps read only the last step, which relied on v6 making it cumulative. Sessions saved by the repo agent, explore, logs, and graph_sub_agent error recovery would have kept only the final step. Replaying those sessions produces orphaned tool_use blocks. It now joins every step's messages.
  • repo/agent.ts (3 places) and the gitsee lab read response.messages for continuations and concept reflection. They now read responseMessages.

Tests

  • New extract-messages-from-steps.test.ts runs a real 2-step tool loop on v7's mock model. It fails against the old last-step logic.
  • The toolsJarvis recovery tests check an inline copy of the function. That copy is updated to v7's per-step behavior.
  • tsc: 0 errors. test:node: 798/798. aieo: 99/99.
  • Live run against Haiku: callModel with a system message, callGenerateObject, and a 2-step tool loop, whose transcript came out as user, assistant, tool, assistant.

Not in this PR

  • Deprecated names that v7 still accepts (system, onStepFinish, totalUsage, generateObject, stepCountIs, image parts, toUIMessageStreamResponse). npx @ai-sdk/codemod v7 can clean these up in a follow-up.
  • Publishing gitsee-agent. Its dependencies changed, but its version is still 1.0.19 so mcp keeps using the local workspace copy.

Evanfeenstra and others added 2 commits September 17, 2026 20:37
- 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>
- 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>
Co-Authored-By: Claude <noreply@anthropic.com>
@Evanfeenstra
Evanfeenstra merged commit 2dd1f5e into main Sep 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant