feat!: upgrade all packages to AI SDK v7 stable#21
Merged
Conversation
- agent: ai ^7.0.19 (peer ai@^7), @ai-sdk/provider 4.0.3; implement LanguageModelV4 (specificationVersion "v4", tagged SharedV4FileData file parts), stepCountIs -> isStepCount, forward toolsContext, bump the runtime ai-major guard to 7, Node >=22 - provider: @ai-sdk/anthropic ^4, @ai-sdk/openai-compatible ^3, @ai-sdk/provider 4.0.3; expose LanguageModelV4/EmbeddingModelV4 - release-please-ai: ai ^7, @ai-sdk/anthropic ^4; generateObject system -> instructions - sandbox: harness/tui/provider-utils canary -> stable (^1.0.23 / ^1.0.19 / ^5.0.7); thinking option is now a tagged config object - workspace: drop the canary-era harness/ai overrides (single stable ai@7 chain), keep the shared zod pin, exclude @ai-sdk/provider from minimumReleaseAge - docs: update install/requirements away from canary tags and ai v6 Change-Id: I31b4cd26da42c8ac1a0d5f31bf100033ab72d1f8 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Port 4000 can already be taken inside a shared workspace; E2E_PORT lets the e2e script lease a different bridge port without editing the script. Change-Id: I4a83cd0424d7be82f7811323d885fdf4a2cce99e Signed-off-by: Thomas Kosiewski <tk@coder.com>
This was referenced Jul 10, 2026
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.
Summary
Upgrades every package in the monorepo from AI SDK v6 (and canary-tagged harness packages) to the stable AI SDK v7 line:
ai^7.0.0)@ai-sdk/provider@ai-sdk/react@ai-sdk/anthropic@ai-sdk/openai-compatible@ai-sdk/harness/harness-claude-code/tui/provider-utilsBreaking-change migrations
CoderLanguageModelnow natively implementsLanguageModelV4(specificationVersion: "v4"). V4's stream parts / usage / messages are structurally identical to V3; the substantive change is file-partdatabecoming the taggedSharedV4FileDataunion — inlinedata/textvariants are handled (text is new),url/referenceare rejected with actionable errors. Also:stepCountIs→isStepCount, the newtoolsContextsetting is surfaced onCoderAgentSettingsand forwarded toToolLoopAgent, the runtimeai-major guard is bumped 6 → 7, andengines.nodeis raised to>=22(matching the rest of the repo).CoderProvidersurface swapped toLanguageModelV4/EmbeddingModelV4.generateObject'ssystem:option renamed toinstructions:.thinkingoption is now a tagged config object ("adaptive"→{ type: "adaptive" },"off"→{ type: "disabled" }). Also added anE2E_PORToverride toscripts/e2e-claude.tssince port 4000 is often taken inside shared workspaces.@ai-sdk/harness/aipnpm overrides are gone — the whole repo now resolves one coherent stableai@7chain. The single-zodpin stays (same duplicate-provider-utilstype-identity rationale as before).aiv6 wording; install/requirements now say Node ≥ 22 andaiv7.Validation
Static + unit gates (all green):
pnpm check— oxfmt, oxlint,tsc --noEmitin all 4 packagespnpm -r test— 152 agent + 21 provider + 11 release-please + 118 sandbox testspnpm build,publint("All good!"),attw("No problems found") on the published packagesdist/artifacts:generateText()throughai@7againstcreateCoderwith a stubbed fetch;CoderAgentconstruction through the new version guard; sandbox provider satisfiesharness-sandbox-v1Live end-to-end against dev.coder.com (all green):
vitest run test/e2e): 5/5 passed against real chatd — generate, stream, and tool round-trips throughai@7'sToolLoopAgentgenerateText/streamTexton the Anthropic surface (claude-sonnet-4-6) and OpenAI-compatible surface (gpt-5.1), including v7's newinputTokenDetails/outputTokenDetailsusage shapeverify-real: 23/23 checks against a started workspace (exec, file I/O, spawn streaming, WebSocket overssh -L)e2e-claude: real Claude Code turn inside a workspace on stable@ai-sdk/harness@1.0.23— asked foruname -sr, answered exactlyLinux 6.8.0-124-generic(29s)Generated with
mux• Model:anthropic:claude-fable-5• Thinking:xhigh