Mintplex-Labs/anything-llm · critical · Error
No Lemonade API Base Path was set.
Error message
No Lemonade API Base Path was set.
What it means
Thrown in the LemonadeEmbedder constructor when process.env.EMBEDDING_BASE_PATH is falsy. Lemonade (AMD's local inference server) is reached via an OpenAI-compatible endpoint derived by parseLemonadeServerEndpoint(basePath, 'openai'), so the raw base path must be present before that derivation runs.
Source
Thrown at server/utils/EmbeddingEngines/lemonade/index.js:7
const { parseLemonadeServerEndpoint } = require("../../AiProviders/lemonade");
const { toChunks, reportEmbeddingProgress } = require("../../helpers");
class LemonadeEmbedder {
constructor() {
if (!process.env.EMBEDDING_BASE_PATH)
throw new Error("No Lemonade API Base Path was set.");
if (!process.env.EMBEDDING_MODEL_PREF)
throw new Error("No Embedding Model Pref was set.");
this.className = "LemonadeEmbedder";
const { OpenAI: OpenAIApi } = require("openai");
this.lemonade = new OpenAIApi({
baseURL: parseLemonadeServerEndpoint(
process.env.EMBEDDING_BASE_PATH,
"openai"
),
apiKey: process.env.LEMONADE_LLM_API_KEY || null,
});
this.model = process.env.EMBEDDING_MODEL_PREF;
this.maxConcurrentChunks = 50;
this.embeddingMaxChunkLength =
process.env.EMBEDDING_MODEL_MAX_CHUNK_LENGTH || 8_191;
}
View on GitHub (pinned to 526360e320)
Solutions
- Set EMBEDDING_BASE_PATH to the Lemonade server URL (e.g. http://localhost:8000).
- Ensure the Lemonade server is running and reachable, and that parseLemonadeServerEndpoint can append the /openai route.
- Optionally set LEMONADE_LLM_API_KEY if the Lemonade server requires auth, and restart the process.
- Verify the resolved URL responds on the /openai/embeddings path.
Defensive patterns
Strategy: validation
Validate before calling
function assertLemonadeBasePath() {
if (!process.env.EMBEDDING_BASE_PATH) {
throw new Error('Missing env EMBEDDING_BASE_PATH (Lemonade server URL)');
}
}
assertLemonadeBasePath(); Try / catch
try {
new LemonadeEmbedder();
} catch (e) {
if (/base path/i.test(e.message)) { /* prompt for Lemonade server URL */ }
throw e;
} Prevention
- Set EMBEDDING_BASE_PATH to the running Lemonade server URL.
- Confirm the server is up and parseLemonadeServerEndpoint can resolve the /openai route.
- Restart the process after setting the var.
When it happens
Trigger: Constructing LemonadeEmbedder while EMBEDDING_BASE_PATH is unset; the Lemonade server URL not saved in config; sharing EMBEDDING_BASE_PATH semantics with the generic provider and leaving it empty for Lemonade.
Common situations: Lemonade server not started; URL changed after a reinstall; using the wrong port; selecting the Lemonade embedding engine before the server is provisioned.
Related errors
- GenericOpenAI must have a valid base path to use for the api
- No Embedding Model Pref was set.
- No Azure API endpoint was set.
- No Azure API key was set.
- No Cohere API key was set.
AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13).
Data as JSON: /api/errors/dacdf1818f9cfca4.
Report an issue: GitHub.