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

  1. Set EMBEDDING_BASE_PATH to the Lemonade server URL (e.g. http://localhost:8000).
  2. Ensure the Lemonade server is running and reachable, and that parseLemonadeServerEndpoint can append the /openai route.
  3. Optionally set LEMONADE_LLM_API_KEY if the Lemonade server requires auth, and restart the process.
  4. 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

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


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