{"record":{"id":"25c67cb783578629","repo":"Mintplex-Labs/anything-llm","slug":"no-docker-model-runner-api-base-path-was-set","errorCode":null,"errorMessage":"No Docker Model Runner API Base Path was set.","messagePattern":"No Docker Model Runner API Base Path was set\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"server/utils/AiProviders/dockerModelRunner/index.js","lineNumber":25,"sourceCode":"} = require(\"../../helpers/chat/responses\");\nconst {\n  LLMPerformanceMonitor,\n} = require(\"../../helpers/chat/LLMPerformanceMonitor\");\nconst { OpenAI: OpenAIApi } = require(\"openai\");\nconst { humanFileSize } = require(\"../../helpers\");\nconst { safeJsonParse } = require(\"../../http\");\n\nclass DockerModelRunnerLLM {\n  static cacheTime = 1000 * 60 * 60 * 24; // 24 hours\n  static cacheFolder = path.resolve(\n    process.env.STORAGE_DIR\n      ? path.resolve(process.env.STORAGE_DIR, \"models\", \"docker-model-runner\")\n      : path.resolve(__dirname, `../../../storage/models/docker-model-runner`)\n  );\n\n  constructor(embedder = null, modelPreference = null) {\n    if (!process.env.DOCKER_MODEL_RUNNER_BASE_PATH)\n      throw new Error(\"No Docker Model Runner API Base Path was set.\");\n    if (!process.env.DOCKER_MODEL_RUNNER_LLM_MODEL_PREF && !modelPreference)\n      throw new Error(\"No Docker Model Runner Model Pref was set.\");\n\n    this.className = \"DockerModelRunnerLLM\";\n    this.dmr = new OpenAIApi({\n      baseURL: parseDockerModelRunnerEndpoint(\n        process.env.DOCKER_MODEL_RUNNER_BASE_PATH\n      ),\n      apiKey: null,\n    });\n\n    this.model =\n      modelPreference || process.env.DOCKER_MODEL_RUNNER_LLM_MODEL_PREF;\n    this.embedder = embedder ?? new NativeEmbedder();\n    this.defaultTemp = 0.7;\n\n    this.limits = {\n      history: this.promptWindowLimit() * 0.15,","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/526360e320da9d1b36074be5ed64fe76e5bbfbbd/server/utils/AiProviders/dockerModelRunner/index.js#L7-L43","documentation":"Constructor guard that prevents DockerModelRunnerLLM instantiation when DOCKER_MODEL_RUNNER_BASE_PATH is unset. This value is the endpoint URL for the Docker Model Runner daemon (an OpenAI-compatible local server, typically http://localhost:12434/v1). Without it the client cannot be configured, so construction aborts.","triggerScenarios":"Instantiating `new DockerModelRunnerLLM()` without DOCKER_MODEL_RUNNER_BASE_PATH set; selecting the Docker Model Runner provider in settings without configuring the endpoint URL; the env var name is mistyped.","commonSituations":"Docker Desktop not running or Docker Model Runner feature not enabled; fresh setup where the base path was never entered; the endpoint URL was set in the UI but not persisted to .env.","solutions":["Set DOCKER_MODEL_RUNNER_BASE_PATH to the Docker Model Runner endpoint (typically http://localhost:12434/v1).","Ensure Docker Desktop is running with Model Runner enabled (docker desktop enable model-runner).","Verify the endpoint is reachable: curl http://localhost:12434/v1/models.","Restart the server after setting the env var."],"exampleFix":"# .env\nDOCKER_MODEL_RUNNER_BASE_PATH=http://localhost:12434/v1","handlingStrategy":"validation","validationCode":"const basePath = process.env.DOCKER_MODEL_RUNNER_BASE_PATH;\nif (!basePath) throw new Error('DOCKER_MODEL_RUNNER_BASE_PATH must be set (e.g. http://localhost:12434/v1)');\n// verify reachability\nconst reachable = await fetch(`${basePath}/models`).then(r => r.ok).catch(() => false);\nif (!reachable) throw new Error(`Docker Model Runner endpoint ${basePath} is not reachable`);","typeGuard":null,"tryCatchPattern":"try {\n  provider = new DockerModelRunnerLLM(embedder, modelPref);\n} catch (e) {\n  if (/No Docker Model Runner API Base Path/i.test(e.message))\n    return respondConfigError('Set DOCKER_MODEL_RUNNER_BASE_PATH (default: http://localhost:12434/v1).');\n  throw e;\n}","preventionTips":["Ensure Docker Desktop is running with Model Runner enabled before starting the server.","Verify the endpoint with curl before configuring.","Set the base path in .env and restart the process."],"tags":["docker-model-runner","missing-config","constructor-guard","env-var","local-llm"],"backgroundTag":null,"analyzedSha":"526360e320da9d1b36074be5ed64fe76e5bbfbbd","analyzedAt":"2026-08-13T01:45:47.170Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}