Skip to content

feat!: upgrade all packages to AI SDK v7 stable#21

Merged
ThomasK33 merged 2 commits into
mainfrom
update-ai-sdk-v7
Jul 10, 2026
Merged

feat!: upgrade all packages to AI SDK v7 stable#21
ThomasK33 merged 2 commits into
mainfrom
update-ai-sdk-v7

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

Summary

Upgrades every package in the monorepo from AI SDK v6 (and canary-tagged harness packages) to the stable AI SDK v7 line:

Dependency Before After
ai ^6.0.206 ^7.0.19 (peer ranges → ^7.0.0)
@ai-sdk/provider 3.0.10 4.0.3
@ai-sdk/react 3.0.208 4.0.20
@ai-sdk/anthropic ^3.x ^4.0.11
@ai-sdk/openai-compatible ^2.0.51 ^3.0.7
@ai-sdk/harness / harness-claude-code / tui / provider-utils canary pins stable ^1.0.23 / ^1.0.23 / ^1.0.19 / ^5.0.7

Breaking-change migrations

  • agent: CoderLanguageModel now natively implements LanguageModelV4 (specificationVersion: "v4"). V4's stream parts / usage / messages are structurally identical to V3; the substantive change is file-part data becoming the tagged SharedV4FileData union — inline data/text variants are handled (text is new), url/reference are rejected with actionable errors. Also: stepCountIsisStepCount, the new toolsContext setting is surfaced on CoderAgentSettings and forwarded to ToolLoopAgent, the runtime ai-major guard is bumped 6 → 7, and engines.node is raised to >=22 (matching the rest of the repo).
  • provider: CoderProvider surface swapped to LanguageModelV4 / EmbeddingModelV4.
  • release-please-ai: generateObject's system: option renamed to instructions:.
  • sandbox: canary → stable harness packages; the Claude Code thinking option is now a tagged config object ("adaptive"{ type: "adaptive" }, "off"{ type: "disabled" }). Also added an E2E_PORT override to scripts/e2e-claude.ts since port 4000 is often taken inside shared workspaces.
  • workspace: the canary-era @ai-sdk/harness/ai pnpm overrides are gone — the whole repo now resolves one coherent stable ai@7 chain. The single-zod pin stays (same duplicate-provider-utils type-identity rationale as before).
  • docs: READMEs updated off canary tags and ai v6 wording; install/requirements now say Node ≥ 22 and ai v7.

Validation

Static + unit gates (all green):

  • pnpm check — oxfmt, oxlint, tsc --noEmit in all 4 packages
  • pnpm -r test — 152 agent + 21 provider + 11 release-please + 118 sandbox tests
  • pnpm build, publint ("All good!"), attw ("No problems found") on the published packages
  • Runtime smoke on built dist/ artifacts: generateText() through ai@7 against createCoder with a stubbed fetch; CoderAgent construction through the new version guard; sandbox provider satisfies harness-sandbox-v1

Live end-to-end against dev.coder.com (all green):

  • agent e2e (vitest run test/e2e): 5/5 passed against real chatd — generate, stream, and tool round-trips through ai@7's ToolLoopAgent
  • provider: live generateText/streamText on the Anthropic surface (claude-sonnet-4-6) and OpenAI-compatible surface (gpt-5.1), including v7's new inputTokenDetails/outputTokenDetails usage shape
  • sandbox verify-real: 23/23 checks against a started workspace (exec, file I/O, spawn streaming, WebSocket over ssh -L)
  • sandbox e2e-claude: real Claude Code turn inside a workspace on stable @ai-sdk/harness@1.0.23 — asked for uname -sr, answered exactly Linux 6.8.0-124-generic (29s)

Generated with mux • Model: anthropic:claude-fable-5 • Thinking: xhigh

- 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>
@ThomasK33 ThomasK33 added this pull request to the merge queue Jul 10, 2026
Merged via the queue into main with commit cba261c Jul 10, 2026
6 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