Mintplex-Labs/anything-llm · error · Error
Privatemode base path must be provided to use agents.
Error message
Privatemode 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 'privatemode' but process.env.PRIVATEMODE_LLM_BASE_PATH is unset/empty. It is a precondition gate inside agent.init() ensuring the PrivateMode endpoint is configured before its client is built.
Source
Thrown at server/utils/agents/index.js:271
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":
if (!process.env.OMLX_LLM_BASE_PATH)
throw new Error("OMLX base path must be provided to use agents.");
break;
case "minimax":
if (!process.env.MINIMAX_API_KEY)
throw new Error("Minimax API key must be provided to use agents.");View on GitHub (pinned to 526360e320)
Solutions
- Set PRIVATEMODE_LLM_BASE_PATH in .env to the PrivateMode endpoint and restart the server.
- Confirm the endpoint is reachable at that URL.
- Switch provider if PrivateMode is not intended.
Example fix
// before (.env) PRIVATEMODE_LLM_BASE_PATH= // after (.env) PRIVATEMODE_LLM_BASE_PATH=https://your-privatemode-endpoint/v1
Defensive patterns
Strategy: validation
Validate before calling
function assertPrivatemodeReady(workspaceAgentProvider) {
const using = workspaceAgentProvider === 'privatemode' || process.env.LLM_PROVIDER === 'privatemode';
if (using && !process.env.PRIVATEMODE_LLM_BASE_PATH)
throw new Error('PRIVATEMODE_LLM_BASE_PATH missing - set it before starting an agent.');
} Try / catch
try { await agent.init(); } catch (e) { if (/Privatemode base path must be provided/.test(e.message)) return showProviderConfig('privatemode'); throw e; } Prevention
- Validate base-path providers at boot.
- Restart after .env edits.
- Confirm the endpoint is reachable before enabling the provider.
When it happens
Trigger: A chat turn calls agent.init(); this.provider resolves to 'privatemode'; case 'privatemode' runs and process.env.PRIVATEMODE_LLM_BASE_PATH is falsy.
Common situations: PrivateMode selected as agent provider but the base path was never saved; endpoint URL changed; .env updated but server not restarted.
Related errors
- Docker Model Runner 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/8b59590311c553e0.
Report an issue: GitHub.