Skip to content

Bump AI SDK packages to v7#336

Merged
pbakaus merged 1 commit into
mainfrom
codex/ai-sdk-v7-rollup
Jul 4, 2026
Merged

Bump AI SDK packages to v7#336
pbakaus merged 1 commit into
mainfrom
codex/ai-sdk-v7-rollup

Conversation

@pbakaus

@pbakaus pbakaus commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

Rolls the remaining Dependabot AI SDK major updates into one tested PR instead of landing four separate major-version PRs:

  • ai: 6.0.208 in the current lockfile, requested range ^6.0.168 -> ^7.0.14 (7.0.14 resolved)
  • @ai-sdk/anthropic: 3.0.85 in the current lockfile, requested range ^3.0.71 -> ^4.0.7 (4.0.7 resolved)
  • @ai-sdk/google: 3.0.83 in the current lockfile, requested range ^3.0.75 -> ^4.0.8 (4.0.8 resolved)
  • @ai-sdk/openai: 3.0.74 in the current lockfile, requested range ^3.0.53 -> ^4.0.7 (4.0.7 resolved)

Also updates the LLM-backed skill-behavior harness to prefer result.responseMessages, which is the AI SDK v7 continuation-message surface, with a fallback to the previous result.response?.messages shape.

Supersedes Dependabot PRs #321, #322, #323, and #324.

Risk / migration notes

  • This is a major AI SDK upgrade family, so provider message/result shapes were the main risk.
  • The only code migration needed in-repo was the skill-behavior harness response-message continuation path.
  • No generated provider/harness artifacts were refreshed or hand-edited.

Validation

  • bun install --frozen-lockfile passed
  • bun run build passed
  • bun run test passed
  • bun run test:skill-behavior passed: 27/27 scenarios across claude-sonnet-4-6, gpt-5.5, and gemini-3.1-flash-lite

I also ran the skill-behavior suite on current main with the old AI SDK stack (ai@6.0.208, providers at v3) as a baseline; it passed 27/27 before this migration.


Note

Medium Risk
Major AI SDK versions can change result/message shapes; risk is limited to dev-only LLM harness usage and was mitigated by full build and skill-behavior test runs.

Overview
Bundles a major upgrade of the Vercel AI SDK stack: core ai moves to v7, and @ai-sdk/anthropic, @ai-sdk/google, and @ai-sdk/openai move to v4, with matching lockfile updates (including new transitive deps such as @workflow/serde and removal of the old OpenTelemetry coupling on ai).

The only application code change is in the skill-behavior test harness: multi-turn scenarios now chain conversation context from result.responseMessages (AI SDK v7), with a fallback to result.response?.messages for compatibility.

Reviewed by Cursor Bugbot for commit f9fa464. Bugbot is set up for automated code reviews on this repo. Configure here.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying impeccable with  Cloudflare Pages  Cloudflare Pages

Latest commit: daa8dc5
Status: ✅  Deploy successful!
Preview URL: https://b87e0142.impeccable-2rv.pages.dev
Branch Preview URL: https://codex-ai-sdk-v7-rollup.impeccable-2rv.pages.dev

View logs

@pbakaus pbakaus force-pushed the codex/ai-sdk-v7-rollup branch from daa8dc5 to f9fa464 Compare July 4, 2026 02:18
@pbakaus pbakaus merged commit 582f23e into main Jul 4, 2026
11 checks passed
@greptile-apps

greptile-apps Bot commented Jul 4, 2026

Copy link
Copy Markdown

Greptile Summary

This PR bumps the Vercel AI SDK packages and updates the skill-behavior harness for the new response shape. The main changes are:

  • ai moves to the v7 line.
  • @ai-sdk/anthropic, @ai-sdk/google, and @ai-sdk/openai move to their v4 lines.
  • bun.lock resolves the matching provider, gateway, and provider-utils updates.
  • tests/skill-behavior/harness.mjs now prefers result.responseMessages for multi-turn continuation, with a fallback to the prior result.response?.messages shape.

Confidence Score: 5/5

Safe to merge with low implementation risk after the reported validation.

The change is limited to dependency updates plus one scoped harness migration; AI SDK v7 provides the top-level response-message surface used here, and the fallback keeps the previous shape working.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • The package manifest and bun.lock were upgraded to ai 7.x and @ai-sdk 4.x, and install, build, and tests were run to verify the changes exited successfully.
  • Harness continuation logic was updated to use resultMessages ?? result.response?.messages ?? [], and the probe was saved with logs captured to confirm the behavior and that the run ended with exit code 0.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
package.json Updates AI SDK core and provider devDependency ranges to the v7/v4 major lines; Node ESM setup and zod peer range remain compatible.
bun.lock Resolves the AI SDK/provider major upgrades and transitive lockfile changes consistently with the manifest.
tests/skill-behavior/harness.mjs Migrates multi-turn continuation capture to prefer AI SDK v7 result.responseMessages with a backward-compatible fallback.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
  participant Test as Skill-behavior scenario
  participant Harness as runTurn()
  participant SDK as AI SDK generateText
  participant Model as Provider model

  Test->>Harness: userPrompt + priorMessages
  Harness->>SDK: "generateText({ system, messages, tools, stopWhen })"
  SDK->>Model: execute model/tool steps
  Model-->>SDK: text + response messages
  SDK-->>Harness: result.responseMessages (v7) or result.response.messages
  Harness-->>Test: responseMessages for next turn
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
  participant Test as Skill-behavior scenario
  participant Harness as runTurn()
  participant SDK as AI SDK generateText
  participant Model as Provider model

  Test->>Harness: userPrompt + priorMessages
  Harness->>SDK: "generateText({ system, messages, tools, stopWhen })"
  SDK->>Model: execute model/tool steps
  Model-->>SDK: text + response messages
  SDK-->>Harness: result.responseMessages (v7) or result.response.messages
  Harness-->>Test: responseMessages for next turn
Loading

Reviews (1): Last reviewed commit: "Bump AI SDK packages to v7" | Re-trigger Greptile

mp3wizard added a commit to mp3wizard/impeccable that referenced this pull request Jul 4, 2026
New upstream features:
- Bump AI SDK packages to v7 (pbakaus#336)
- Fix live toast stale callback race (pbakaus#271)
- Replace Alumni Sans Pinstripe with Alumni Sans across the type system
- Bump bun minor/patch deps + actions/cache from 5 to 6

Security findings: wildcard postMessage in browser extension (by-design), mutable GH Actions tags (upstream), dependabot missing cooldown (fixed)
Security fixes: added cooldown: default-days: 7 to dependabot.yml (bun + github-actions ecosystems)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant