{"record":{"id":"bf580ff8c21fca31","repo":"Mintplex-Labs/anything-llm","slug":"no-lemonade-base-path-was-set","errorCode":null,"errorMessage":"No Lemonade base path was set.","messagePattern":"No Lemonade base path was set\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/utils/SpeechToText/lemonade/index.js","lineNumber":8,"sourceCode":"const path = require(\"path\");\nconst { parseLemonadeServerEndpoint } = require(\"../../AiProviders/lemonade\");\nconst { convertAudioBufferToWav } = require(\"../helpers\");\n\nclass LemonadeSTT {\n  constructor() {\n    if (!process.env.STT_LEMONADE_BASE_PATH)\n      throw new Error(\"No Lemonade base path was set.\");\n\n    const { OpenAI: OpenAIApi } = require(\"openai\");\n    this.openai = new OpenAIApi({\n      baseURL: parseLemonadeServerEndpoint(\n        process.env.STT_LEMONADE_BASE_PATH,\n        \"openai\"\n      ),\n      apiKey: process.env.LEMONADE_LLM_API_KEY || null,\n    });\n    this.model = process.env.STT_LEMONADE_MODEL_PREF ?? \"whisper-1\";\n    this.#log(\n      `Service (${process.env.STT_LEMONADE_BASE_PATH}) with model: ${this.model}`\n    );\n  }\n\n  #log(text, ...args) {\n    console.log(`\\x1b[32m[LemonadeSTT]\\x1b[0m ${text}`, ...args);\n  }","sourceCodeStart":1,"sourceCodeEnd":26,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/526360e320da9d1b36074be5ed64fe76e5bbfbbd/server/utils/SpeechToText/lemonade/index.js#L1-L26","documentation":"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.","triggerScenarios":"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.","commonSituations":"Lemonade AI server deployment missing the base path env; switching to lemonade without completing its env block; .env not loaded in the runtime.","solutions":["Add STT_LEMONADE_BASE_PATH=http://<lemonade-host>:<port> to .env and restart.","Optionally set STT_LEMONADE_MODEL_PREF (defaults to whisper-1) and LEMONADE_LLM_API_KEY if your Lemonade server requires auth.","Verify the base path reaches the Lemonade server (curl the /openai endpoint).","In Docker, ensure the variable is passed to the container."],"exampleFix":"# before\nSTT_PROVIDER=lemonade\n# STT_LEMONADE_BASE_PATH missing\n\n# after\nSTT_PROVIDER=lemonade\nSTT_LEMONADE_BASE_PATH=http://localhost:8000","handlingStrategy":"validation","validationCode":"if (process.env.STT_PROVIDER === \"lemonade\" && !process.env.STT_LEMONADE_BASE_PATH) {\n  throw new Error(\"STT_PROVIDER is 'lemonade' but STT_LEMONADE_BASE_PATH is not set.\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  return new LemonadeSTT();\n} catch (e) {\n  if (/No Lemonade base path/i.test(e.message)) {\n    logger.error(\"Set STT_LEMONADE_BASE_PATH (Lemonade server URL) in .env, then restart.\");\n  }\n  throw e;\n}","preventionTips":["Validate lemonade env block (base path, optional key, model) together at startup.","Confirm the Lemonade server URL is reachable from the server container.","Restart after editing .env."],"tags":["stt","lemonade","configuration","environment"],"backgroundTag":null,"analyzedSha":"526360e320da9d1b36074be5ed64fe76e5bbfbbd","analyzedAt":"2026-08-13T01:45:47.170Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}