Skip to content

feat: upgrade Vercel AI SDK v5 to v6#21

Open
dsfaccini wants to merge 2 commits intopydantic:mainfrom
dsfaccini:feat/upgrade-ai-sdk-v6
Open

feat: upgrade Vercel AI SDK v5 to v6#21
dsfaccini wants to merge 2 commits intopydantic:mainfrom
dsfaccini:feat/upgrade-ai-sdk-v6

Conversation

@dsfaccini
Copy link
Copy Markdown
Contributor

Summary

  • Upgrade ai from v5 to v6 (^6.0.149) and @ai-sdk/react from v2 to v3 (^3.0.151)
  • Add UI support for new v6 tool approval states (approval-requested, approval-responded, output-denied)
  • Fixes compatibility with pydantic-ai >= 1.49.0 which sends providerMetadata in tool call responses (rejected by SDK v5)

Closes #14

Test plan

  • pnpm run typecheck — passes
  • pnpm eslint src/ — passes
  • CI lint + typecheck job passes
  • Manual test: run with pydantic-ai >= 1.49.0 backend, verify streaming tool calls work without providerMetadata rejection

🤖 Generated with Claude Code

dsfaccini and others added 2 commits April 6, 2026 21:25
Fixes compatibility with pydantic-ai >= 1.49.0 which sends
providerMetadata in tool call responses (rejected by SDK v5).
Also adds support for new v6 tool approval states in the UI.

Closes pydantic#14

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The guard `if (conversationId !== '/' && messages.length === 0) return null`
causes a blank content area when the app is served at a sub-path (e.g., via
iframe proxy at /api/sessions/{id}/app/). conversationId is derived from
window.location.pathname, which is never '/' in that context, so the guard
always triggers on fresh sessions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Upgrade Vercel AI SDK to v6 for pydantic-ai >= 1.49.0 compatibility

1 participant