-
Notifications
You must be signed in to change notification settings - Fork 213
feat(llma): Add support for Vercel AI SDK 6 #2711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This updates the @posthog/ai Vercel middleware to support the new AI SDK 6 which uses LanguageModelV3 types instead of V2. Changes: - Bump ai dependency to 6.0.0-beta.138 - Bump @ai-sdk/provider to 3.0.0-beta.25 - Update all LanguageModelV2* types to LanguageModelV3* - Add specificationVersion: 'v3' to middleware - Update tests with V3 types and supportedUrls property BREAKING CHANGE: This requires Vercel AI SDK v6 (beta) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
packages/ai/tests/vercel.test.ts, line 321 (link)syntax:
logprobsremoved fromLanguageModelV3response type but still present here
3 files reviewed, 1 comment
Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
Size Change: +2.83 kB (+0.06%) Total Size: 5.11 MB
ℹ️ View Unchanged
|
|
hey thanks for doing this @andrewm4894 ! sorry for being eager but any chance this can be released? i had to build this branch and tarball the package, and that was a mild adventure (e.g. I had to figure out why commands like |
Problem
Users want to use PostHog AI analytics with Vercel AI SDK 6, which introduces LanguageModelV3 types. The current implementation only supports SDK 5 with LanguageModelV2 types.
Changes
aidependency to6.0.0-beta.138@ai-sdk/providerto3.0.0-beta.25LanguageModelV2*types toLanguageModelV3*in middleware.tsspecificationVersion: 'v3'to middleware objectsupportedUrlspropertyRelease info Sub-libraries affected
Libraries affected
Checklist
Note: This is a breaking change - requires Vercel AI SDK v6 (beta)
If releasing new changes
pnpm changesetto generate a changeset file