Describe the problem/error/question
Google has deprecated their text-embedding-004 model (https://ai.google.dev/gemini-api/docs/deprecations#embedding-models) so I’ve had to switch to using gemini-embedding-001. The number of dimensions has changed from 768 to 3072 with the new model. When I encode the data to save data into my Supabase database the embedding is using 3072 dimensions, but when I query the database n8n defaults to 768 dimensions, so it produces an error. There isn’t a way to configure the search embedding RETRIEVAL_QUERY option in n8n, so I am stuck - the save embedding size is different to the query embedding size. There doesn’t seem to be a way of using Google’s embedding model with the Supabase Vector Store node in n8n because of the discrepancy.
What is the error message (if any)?
When using the gemini-embedding-001 model for inserting into a 768 vector store:
Error inserting: expected 768 dimensions, not 3072 400 Bad Request
When using the gemini-embedding-001 model for searching a 3072 vector store
Error searching for documents: 22000 different vector dimensions 768 and 3072 null
Information on your n8n setup
- n8n version: 1.123.14
- Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud,