Mintplex-Labs/anything-llm · critical · Error
No Docker Model Runner API Base Path was set.
Error message
No Docker Model Runner API Base Path was set.
What it means
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.
Source
Thrown at server/utils/AiProviders/dockerModelRunner/index.js:25
} = require("../../helpers/chat/responses");
const {
LLMPerformanceMonitor,
} = require("../../helpers/chat/LLMPerformanceMonitor");
const { OpenAI: OpenAIApi } = require("openai");
const { humanFileSize } = require("../../helpers");
const { safeJsonParse } = require("../../http");
class DockerModelRunnerLLM {
static cacheTime = 1000 * 60 * 60 * 24; // 24 hours
static cacheFolder = path.resolve(
process.env.STORAGE_DIR
? path.resolve(process.env.STORAGE_DIR, "models", "docker-model-runner")
: path.resolve(__dirname, `../../../storage/models/docker-model-runner`)
);
constructor(embedder = null, modelPreference = null) {
if (!process.env.DOCKER_MODEL_RUNNER_BASE_PATH)
throw new Error("No Docker Model Runner API Base Path was set.");
if (!process.env.DOCKER_MODEL_RUNNER_LLM_MODEL_PREF && !modelPreference)
throw new Error("No Docker Model Runner Model Pref was set.");
this.className = "DockerModelRunnerLLM";
this.dmr = new OpenAIApi({
baseURL: parseDockerModelRunnerEndpoint(
process.env.DOCKER_MODEL_RUNNER_BASE_PATH
),
apiKey: null,
});
this.model =
modelPreference || process.env.DOCKER_MODEL_RUNNER_LLM_MODEL_PREF;
this.embedder = embedder ?? new NativeEmbedder();
this.defaultTemp = 0.7;
this.limits = {
history: this.promptWindowLimit() * 0.15,View on GitHub (pinned to 526360e320)
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.
Example fix
# .env DOCKER_MODEL_RUNNER_BASE_PATH=http://localhost:12434/v1
Defensive patterns
Strategy: validation
Validate before calling
const basePath = process.env.DOCKER_MODEL_RUNNER_BASE_PATH;
if (!basePath) throw new Error('DOCKER_MODEL_RUNNER_BASE_PATH must be set (e.g. http://localhost:12434/v1)');
// verify reachability
const reachable = await fetch(`${basePath}/models`).then(r => r.ok).catch(() => false);
if (!reachable) throw new Error(`Docker Model Runner endpoint ${basePath} is not reachable`); Try / catch
try {
provider = new DockerModelRunnerLLM(embedder, modelPref);
} catch (e) {
if (/No Docker Model Runner API Base Path/i.test(e.message))
return respondConfigError('Set DOCKER_MODEL_RUNNER_BASE_PATH (default: http://localhost:12434/v1).');
throw e;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- No Docker Model Runner Model Pref was set.
- No CometAPI API key was set.
- No DeepSeek API key was set.
- Docker Model Runner chat: ${this.model} is not valid or defi
- No FireworksAI API key was set.
AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13).
Data as JSON: /api/errors/25c67cb783578629.
Report an issue: GitHub.