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 by the LemonadeEmbedder constructor when EMBEDDING_BASE_PATH is unset. Lemonade (AMD's local Ryzen AI server) is addressed through its OpenAI-compatible route, which this class derives by parsing EMBEDDING_BASE_PATH with parseLemonadeServerEndpoint(..., 'openai'). Without a base path there is no server to talk to, so construction fails immediately.

Solutions

  1. Start your Lemonade server first and note its URL (default is typically http://localhost:8080 or as printed by lemonade serve)
  2. Set EMBEDDING_BASE_PATH to that URL in the embedding settings or .env
  3. Also set EMBEDDING_MODEL_PREF (this constructor throws separately if it is missing)
  4. Restart the server so the constructor re-reads the environment

Example fix

# before
EMBEDDING_ENGINE=lemonade

# after
EMBEDDING_ENGINE=lemonade
EMBEDDING_BASE_PATH=http://localhost:8080
EMBEDDING_MODEL_PREF=lmstudio-community/gemma-3-1b
Defensive patterns

Strategy: validation

Validate before calling

function assertLemonadeEmbedderConfigured() {
  const missing = ["EMBEDDING_BASE_PATH", "EMBEDDING_MODEL_PREF"].filter(
    (k) => !process.env[k]
  );
  if (missing.length) {
    throw new Error(`Lemonade embedder misconfigured; missing: ${missing.join(", ")}`);
  }
}
assertLemonadeEmbedderConfigured();

Try / catch

try {
  const embedder = new LemonadeEmbedder();
} catch (e) {
  if (e.message === "No Lemonade API Base Path was set.") {
    // prompt for the lemonade serve URL; construction is deterministic, no retry
  }
  throw e;
}

Prevention

When it happens

Trigger: Selecting the Lemonade embedding engine in settings without providing the server URL; starting the backend with EMBEDDING_ENGINE=lemonade but no EMBEDDING_BASE_PATH; Lemonade installed but its server URL never entered; env var misspelled or set after process start.

Common situations: Setting up AMD Ryzen AI / Lemonade laptop workflows where the LLM provider was configured but the embedding provider was not; the Lemonade server was started later and the URL was never recorded in settings.

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


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

Appendix: 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 3aec848f28)