Mintplex-Labs/anything-llm · error · Error
No Lemonade base path was set.
Error message
No Lemonade base path was set.
What it means
LemonadeSTT's constructor throws when process.env.STT_LEMONADE_BASE_PATH is unset or empty. The base path is needed to derive the OpenAI-compatible endpoint (via parseLemonadeServerEndpoint(..., 'openai')) for the local Lemonade server that runs the whisper.cpp-backed STT model (default whisper-1).
Solutions
- Add STT_LEMONADE_BASE_PATH=<lemonade-url> (e.g. http://localhost:8000) to .env and restart
- Optionally set STT_LEMONADE_MODEL_PREF (defaults to whisper-1) and LEMONADE_LLM_API_KEY if the server requires auth
- In Docker, point at the host running Lemonade (host.docker.internal or the service name), not localhost
- Verify the Lemonade server is up before restarting the app
Example fix
# before (.env) STT_PROVIDER=lemonade # after (.env) STT_PROVIDER=lemonade STT_LEMONADE_BASE_PATH=http://localhost:8000
Defensive patterns
Strategy: validation
Validate before calling
if (process.env.STT_PROVIDER === 'lemonade' && !process.env.STT_LEMONADE_BASE_PATH) {
throw new Error('STT_PROVIDER=lemonade requires STT_LEMONADE_BASE_PATH (e.g. http://localhost:8000)');
} Try / catch
try {
stt = new LemonadeSTT();
} catch (err) {
if (err.message === 'No Lemonade base path was set.') {
// prompt for the Lemonade server URL before retrying
}
throw err;
} Prevention
- Set STT_LEMONADE_BASE_PATH whenever STT_PROVIDER=lemonade is enabled
- In Docker, target the host/service running Lemonade, not localhost inside the container
- Validate provider env pairs in a boot-time dependency check
When it happens
Trigger: STT_PROVIDER=lemonade configured but STT_LEMONADE_BASE_PATH never set; variable present only on the machine running the Lemonade server, not the AnythingLLM server; .env edited after process start.
Common situations: Lemonade installed and running locally (e.g. http://localhost:8000) but the integration env never added; Docker deployments where localhost would point inside the container instead of the host; values missing the scheme so later endpoint parsing misbehaves.
Understand the failure class
Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.
Related errors
- No Deepgram API key was set.
- No Groq API key was set.
- No Embedding Model Pref was set.
- No Lemonade API Base Path was set.
- No OpenRouter image generation API key was set.
AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18).
Data as JSON: /api/errors/bf580ff8c21fca31.
Report an issue: GitHub.
Appendix: source
Thrown at server/utils/SpeechToText/lemonade/index.js:8
const path = require("path");
const { parseLemonadeServerEndpoint } = require("../../AiProviders/lemonade");
const { convertAudioBufferToWav } = require("../helpers");
class LemonadeSTT {
constructor() {
if (!process.env.STT_LEMONADE_BASE_PATH)
throw new Error("No Lemonade base path was set.");
const { OpenAI: OpenAIApi } = require("openai");
this.openai = new OpenAIApi({
baseURL: parseLemonadeServerEndpoint(
process.env.STT_LEMONADE_BASE_PATH,
"openai"
),
apiKey: process.env.LEMONADE_LLM_API_KEY || null,
});
this.model = process.env.STT_LEMONADE_MODEL_PREF ?? "whisper-1";
this.#log(
`Service (${process.env.STT_LEMONADE_BASE_PATH}) with model: ${this.model}`
);
}
#log(text, ...args) {
console.log(`\x1b[32m[LemonadeSTT]\x1b[0m ${text}`, ...args);
}View on GitHub (pinned to 3aec848f28)