Skip to content

Commit bca9d8a

Browse files
fix(cli): downgrade AI SDK to v5 for @convex-dev/agent compatibility (#785)
* fix: downgrade AI SDK to v5 for @convex-dev/agent compatibility @convex-dev/agent@0.3.2 requires ai@^5.0.29, not ai@^6.0.3. Also downgrade @ai-sdk/* packages to v2.x which return LanguageModelV2. This fixes TypeScript errors when using the AI example with Convex backend. Relates to: get-convex/agent#202 * fix: update AI SDK versions to existing npm releases - ai: ^5.0.117 (5.0.29 does not exist on npm) - @ai-sdk/google: ^2.0.52 (2.0.0 does not exist on npm) Addresses CodeRabbit review feedback. * Revert "fix: update AI SDK versions to existing npm releases" This reverts commit e2ef101. * Revert "fix: downgrade AI SDK to v5 for @convex-dev/agent compatibility" This reverts commit 1650b28. * add ai in custom deps --------- Co-authored-by: Aman Varshney <amanvarshney.work@gmail.com>
1 parent f3e7e74 commit bca9d8a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/cli/src/helpers/addons/examples-setup.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ async function setupAIDependencies(config: ProjectConfig) {
8282

8383
if (backend === "convex" && convexBackendDirExists) {
8484
await addPackageDependency({
85-
dependencies: ["@convex-dev/agent", "ai", "@ai-sdk/google"],
85+
dependencies: ["@convex-dev/agent"],
86+
customDependencies: {
87+
ai: "^5.0.117",
88+
"@ai-sdk/google": "^2.0.52",
89+
},
8690
projectDir: convexBackendDir,
8791
});
8892
} else if (backend === "self" && webClientDirExists) {

0 commit comments

Comments
 (0)