{"record":{"id":"dacdf1818f9cfca4","repo":"Mintplex-Labs/anything-llm","slug":"no-lemonade-api-base-path-was-set-dacdf1","errorCode":null,"errorMessage":"No Lemonade API Base Path was set.","messagePattern":"No Lemonade API Base Path was set\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"server/utils/EmbeddingEngines/lemonade/index.js","lineNumber":7,"sourceCode":"const { parseLemonadeServerEndpoint } = require(\"../../AiProviders/lemonade\");\nconst { toChunks, reportEmbeddingProgress } = require(\"../../helpers\");\n\nclass LemonadeEmbedder {\n  constructor() {\n    if (!process.env.EMBEDDING_BASE_PATH)\n      throw new Error(\"No Lemonade API Base Path was set.\");\n    if (!process.env.EMBEDDING_MODEL_PREF)\n      throw new Error(\"No Embedding Model Pref was set.\");\n    this.className = \"LemonadeEmbedder\";\n    const { OpenAI: OpenAIApi } = require(\"openai\");\n    this.lemonade = new OpenAIApi({\n      baseURL: parseLemonadeServerEndpoint(\n        process.env.EMBEDDING_BASE_PATH,\n        \"openai\"\n      ),\n      apiKey: process.env.LEMONADE_LLM_API_KEY || null,\n    });\n    this.model = process.env.EMBEDDING_MODEL_PREF;\n\n    this.maxConcurrentChunks = 50;\n    this.embeddingMaxChunkLength =\n      process.env.EMBEDDING_MODEL_MAX_CHUNK_LENGTH || 8_191;\n  }\n","sourceCodeStart":1,"sourceCodeEnd":25,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/526360e320da9d1b36074be5ed64fe76e5bbfbbd/server/utils/EmbeddingEngines/lemonade/index.js#L1-L25","documentation":"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.","triggerScenarios":"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.","commonSituations":"Lemonade server not started; URL changed after a reinstall; using the wrong port; selecting the Lemonade embedding engine before the server is provisioned.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"function assertLemonadeBasePath() {\n  if (!process.env.EMBEDDING_BASE_PATH) {\n    throw new Error('Missing env EMBEDDING_BASE_PATH (Lemonade server URL)');\n  }\n}\nassertLemonadeBasePath();","typeGuard":null,"tryCatchPattern":"try {\n  new LemonadeEmbedder();\n} catch (e) {\n  if (/base path/i.test(e.message)) { /* prompt for Lemonade server URL */ }\n  throw e;\n}","preventionTips":["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."],"tags":["lemonade","amd","embeddings","config","env","local-llm","startup"],"backgroundTag":null,"analyzedSha":"526360e320da9d1b36074be5ed64fe76e5bbfbbd","analyzedAt":"2026-08-13T01:45:47.170Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}