Gemini embeddings failing on fetch

I’m re-embedding a hefty amount of data sources through gemini. I have a pipeline set up that does this and then uploads the embeddings to our vector store. This has been working fine, and then in the past few days I’ve started seeing this error:

Error: exception TypeError: fetch failed sending request
at /opt/app/node_modules/@google/genai/dist/node/index.cjs:11264:19

Our embeddings are now only succeeding about 1/3 of the time, and the other 2/3 of the time they fail with this error. Has anyone else run into this? Is there a way to fix it?

1 Like

Hi @Livia_Seibert, Welcome to the AI Forum!!

Thanks for reaching out to us!

The error often points to a network connectivity (proxy, firewall) issue. Could you please provide a reproducible code snippet along with the specific model name you are using, your runtime environment, and your current version of @google/genai package to replicate the issue?

1 Like