Mintplex-Labs/anything-llm · error · Error
Docker Model Runner base path must be provided to use agents
Error message
Docker Model Runner base path must be provided to use agents.
What it means
Thrown by checkSetup() (server/utils/agents/index.js:128) when the resolved agent provider is 'docker-model-runner' but process.env.DOCKER_MODEL_RUNNER_BASE_PATH is unset/empty. It is a precondition gate in agent.init() ensuring the local Docker Model Runner endpoint is configured before use.
Source
Thrown at server/utils/agents/index.js:265
case "cometapi":
if (!process.env.COMETAPI_LLM_API_KEY)
throw new Error("CometAPI API Key must be provided to use agents.");
break;
case "foundry":
if (!process.env.FOUNDRY_BASE_PATH)
throw new Error("Foundry base path must be provided to use agents.");
break;
case "giteeai":
if (!process.env.GITEE_AI_API_KEY)
throw new Error("GiteeAI API Key must be provided to use agents.");
break;
case "cohere":
if (!process.env.COHERE_API_KEY)
throw new Error("Cohere API key must be provided to use agents.");
break;
case "docker-model-runner":
if (!process.env.DOCKER_MODEL_RUNNER_BASE_PATH)
throw new Error(
"Docker Model Runner base path must be provided to use agents."
);
break;
case "privatemode":
if (!process.env.PRIVATEMODE_LLM_BASE_PATH)
throw new Error(
"Privatemode base path must be provided to use agents."
);
break;
case "sambanova":
if (!process.env.SAMBANOVA_LLM_API_KEY)
throw new Error("SambaNova API key must be provided to use agents.");
break;
case "lemonade":
if (!process.env.LEMONADE_LLM_BASE_PATH)
throw new Error("Lemonade base path must be provided to use agents.");
break;
case "omlx":View on GitHub (pinned to 526360e320)
Solutions
- Set DOCKER_MODEL_RUNNER_BASE_PATH in .env (e.g. http://localhost:12434/engines/llama.cpp/v1) and restart the server.
- Confirm the model-runner container/service is reachable at that URL.
- Switch provider if Docker Model Runner is not intended.
Example fix
// before (.env) DOCKER_MODEL_RUNNER_BASE_PATH= // after (.env) DOCKER_MODEL_RUNNER_BASE_PATH=http://localhost:12434/engines/llama.cpp/v1
Defensive patterns
Strategy: validation
Validate before calling
function assertDockerModelRunnerReady(workspaceAgentProvider) {
const using = workspaceAgentProvider === 'docker-model-runner' || process.env.LLM_PROVIDER === 'docker-model-runner';
if (using && !process.env.DOCKER_MODEL_RUNNER_BASE_PATH)
throw new Error('DOCKER_MODEL_RUNNER_BASE_PATH missing - set it before starting an agent.');
} Try / catch
try { await agent.init(); } catch (e) { if (/Docker Model Runner base path must be provided/.test(e.message)) return showProviderConfig('docker-model-runner'); throw e; } Prevention
- Validate base-path providers at boot.
- Restart after .env edits.
- Confirm the local endpoint is reachable before enabling the provider.
When it happens
Trigger: A chat turn calls agent.init(); this.provider resolves to 'docker-model-runner'; case 'docker-model-runner' runs and process.env.DOCKER_MODEL_RUNNER_BASE_PATH is falsy.
Common situations: Docker Model Runner picked as agent provider but base path never set; the endpoint URL changed; .env updated but server not restarted.
Related errors
- Privatemode base path must be provided to use agents.
- Lemonade base path must be provided to use agents.
- OMLX base path must be provided to use agents.
- LMStudio base path must be provided to use agents.
- Ollama base path must be provided to use agents.
AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13).
Data as JSON: /api/errors/25e8b9447d162630.
Report an issue: GitHub.