Zaid
Zaid3w ago

Upgrading AI SDK to v5 in Convex RAG component

I am trying to do the following in my rag.ts:
export const rag = new RAG(components.rag, {
textEmbeddingModel: google.textEmbeddingModel("gemini-embedding-001"),
embeddingDimension: 2048,
});
export const rag = new RAG(components.rag, {
textEmbeddingModel: google.textEmbeddingModel("gemini-embedding-001"),
embeddingDimension: 2048,
});
I want to use the new gemini-embedding-001 model for my application but I cannot do so because of this error: "Uncaught AI_UnsupportedModelVersionError: Unsupported model version. AI SDK 4 only supports models that implement specification version "v1". Please upgrade to AI SDK 5 to use this model." I see that the convex rag component uses "ai": "^4.3.16" which might need a upgrade to v5 for compatibility. My project is using:
"ai": "^5.0.0",
"@ai-sdk/google": "^2.0.0",
"ai": "^5.0.0",
"@ai-sdk/google": "^2.0.0",
Let me know if you need more information about my project.
2 Replies
Convex Bot
Convex Bot3w ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
idublv
idublv3w ago
I am having the same issue

Did you find this page helpful?