[GH-ISSUE #2972] [BUG]: AnythingLLM When using Gemini's embeddong model when deploying docker, you must use gemini's LLm, otherwise an error No Gemini API key was set will be reported. #1897

Closed
opened 2026-02-22 18:27:07 -05:00 by yindo · 1 comment
Owner

Originally created by @dvchdbfhjd on GitHub (Jan 14, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2972

How are you running AnythingLLM?

Docker (local)

What happened?

When I configure AnythingLLM using DeepSeek's LLM api in docker and then use text-embedding-004, it will fail. I checked the log and reported an error No Gemini API key was set. At first, I thought it was a problem with my environment, until I debugged it for an afternoon. Found that the environment variable of EMBEDDING is GEMINI_EMBEDDING_API_KEY. I just discovered that this was the case. After changing the LLM model to gemini-pro, everything became normal.
Is this a bug or is the initial setting like this? If the setting is like this, can you give a more understandable error message?

Are there known steps to reproduce?

The embedding engine is successfully set to text-embedding-004 and LLM is successfully set to DeepSeek

Originally created by @dvchdbfhjd on GitHub (Jan 14, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2972 ### How are you running AnythingLLM? Docker (local) ### What happened? When I configure AnythingLLM using DeepSeek's LLM api in docker and then use text-embedding-004, it will fail. I checked the log and reported an error No Gemini API key was set. At first, I thought it was a problem with my environment, until I debugged it for an afternoon. Found that the environment variable of EMBEDDING is GEMINI_EMBEDDING_API_KEY. I just discovered that this was the case. After changing the LLM model to gemini-pro, everything became normal. Is this a bug or is the initial setting like this? If the setting is like this, can you give a more understandable error message? ### Are there known steps to reproduce? The embedding engine is successfully set to text-embedding-004 and LLM is successfully set to DeepSeek
yindo added the possible bug label 2026-02-22 18:27:07 -05:00
yindo closed this issue 2026-02-22 18:27:07 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jan 14, 2025):

GEMINI_EMBEDDING_API_KEY this key is only useful if the EMBEDDING_ENGINE is gemini

But yes, this is wrong
https://github.com/Mintplex-Labs/anything-llm/blob/21af81085aeb049750942ac5f3b84775cb461693/server/utils/EmbeddingEngines/gemini/index.js#L6-L7

since embedding has its own key

@timothycarambat commented on GitHub (Jan 14, 2025): `GEMINI_EMBEDDING_API_KEY` this key is only useful if the `EMBEDDING_ENGINE` is `gemini` But yes, this is wrong https://github.com/Mintplex-Labs/anything-llm/blob/21af81085aeb049750942ac5f3b84775cb461693/server/utils/EmbeddingEngines/gemini/index.js#L6-L7 since embedding has its own key
yindo changed title from [BUG]: AnythingLLM When using Gemini's embeddong model when deploying docker, you must use gemini's LLm, otherwise an error No Gemini API key was set will be reported. to [GH-ISSUE #2972] [BUG]: AnythingLLM When using Gemini's embeddong model when deploying docker, you must use gemini's LLm, otherwise an error No Gemini API key was set will be reported. 2026-06-05 14:43:19 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1897