Mintplex-Labs/anything-llm · error · Error

No Lemonade base path was set.

Error message

No Lemonade base path was set.

What it means

Thrown by the LemonadeSTT constructor when process.env.STT_LEMONADE_BASE_PATH is falsy. Lemonade (a local AI server) requires a base URL to build the OpenAI-compatible client, so without it the client cannot be configured. The base path is parsed by parseLemonadeServerEndpoint to derive the /openai route.

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 526360e320)

Solutions

  1. Add STT_LEMONADE_BASE_PATH=http://<lemonade-host>:<port> to .env and restart.
  2. Optionally set STT_LEMONADE_MODEL_PREF (defaults to whisper-1) and LEMONADE_LLM_API_KEY if your Lemonade server requires auth.
  3. Verify the base path reaches the Lemonade server (curl the /openai endpoint).
  4. In Docker, ensure the variable is passed to the container.

Example fix

# before
STT_PROVIDER=lemonade
# STT_LEMONADE_BASE_PATH missing

# after
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 is 'lemonade' but STT_LEMONADE_BASE_PATH is not set.");
}

Try / catch

try {
  return new LemonadeSTT();
} catch (e) {
  if (/No Lemonade base path/i.test(e.message)) {
    logger.error("Set STT_LEMONADE_BASE_PATH (Lemonade server URL) in .env, then restart.");
  }
  throw e;
}

Prevention

When it happens

Trigger: STT_PROVIDER=lemonade is set but STT_LEMONADE_BASE_PATH is missing/empty; the var was added but the process was not restarted; the var was set under a different name.

Common situations: Lemonade AI server deployment missing the base path env; switching to lemonade without completing its env block; .env not loaded in the runtime.

Related errors


AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13). Data as JSON: /api/errors/bf580ff8c21fca31. Report an issue: GitHub.