Issue with Google Gemini Embeddings node: "models/text-embedding-004" is not supported

I am encountering an error in the Google Gemini Embeddings node. It was previously working fine, but now it displays a validation error stating: “The value ‘models/text-embedding-004’ is not supported!”
Details:
Node Name: Google Gemini Embeddings
Model Selected: models/text-embedding-004
Error Message: The value is flagged as not supported in the parameter dropdown.
Credential: Google Gemini API (Verified and active)
I have tried re-selecting the model and refreshing the credentials, but the issue persists. Could you please check if there is a mismatch in the model naming convention or if an update is required for this node?

n8n 2.6.3

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Itsdevelopment Welcome!
The error “The value ‘models/text-embedding-004’ is not supported” occurs because the text-embedding-004 model has been deprecated or retired by Google. You can solve this by using another model which is currently active like gemini-embedding-001 , hope this helps.

This isn’t a solution because the embedding dimensions are not the same.

2 Likes

Hi @Itsdevelopment, welcome to the n8n community :dizzy: ! As Anshul and Prince_NoCode already pointed out, this unfortunately means you’ll need to either re-embed your existing data with the new model or keep the old vectors as they are and plan a migration, since mixing dimensions won’t work.

Is there no other way?

There seems to be a way to adjust gemini-embedding-001 to other sizes according to the API docs: