{"record":{"id":"8b59590311c553e0","repo":"Mintplex-Labs/anything-llm","slug":"privatemode-base-path-must-be-provided-to-use-agen","errorCode":null,"errorMessage":"Privatemode base path must be provided to use agents.","messagePattern":"Privatemode base path must be provided to use agents\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/utils/agents/index.js","lineNumber":271,"sourceCode":"          throw new Error(\"Foundry base path must be provided to use agents.\");\n        break;\n      case \"giteeai\":\n        if (!process.env.GITEE_AI_API_KEY)\n          throw new Error(\"GiteeAI API Key must be provided to use agents.\");\n        break;\n      case \"cohere\":\n        if (!process.env.COHERE_API_KEY)\n          throw new Error(\"Cohere API key must be provided to use agents.\");\n        break;\n      case \"docker-model-runner\":\n        if (!process.env.DOCKER_MODEL_RUNNER_BASE_PATH)\n          throw new Error(\n            \"Docker Model Runner base path must be provided to use agents.\"\n          );\n        break;\n      case \"privatemode\":\n        if (!process.env.PRIVATEMODE_LLM_BASE_PATH)\n          throw new Error(\n            \"Privatemode base path must be provided to use agents.\"\n          );\n        break;\n      case \"sambanova\":\n        if (!process.env.SAMBANOVA_LLM_API_KEY)\n          throw new Error(\"SambaNova API key must be provided to use agents.\");\n        break;\n      case \"lemonade\":\n        if (!process.env.LEMONADE_LLM_BASE_PATH)\n          throw new Error(\"Lemonade base path must be provided to use agents.\");\n        break;\n      case \"omlx\":\n        if (!process.env.OMLX_LLM_BASE_PATH)\n          throw new Error(\"OMLX base path must be provided to use agents.\");\n        break;\n      case \"minimax\":\n        if (!process.env.MINIMAX_API_KEY)\n          throw new Error(\"Minimax API key must be provided to use agents.\");","sourceCodeStart":253,"sourceCodeEnd":289,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/526360e320da9d1b36074be5ed64fe76e5bbfbbd/server/utils/agents/index.js#L253-L289","documentation":"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.","triggerScenarios":"A chat turn calls agent.init(); this.provider resolves to 'privatemode'; case 'privatemode' runs and process.env.PRIVATEMODE_LLM_BASE_PATH is falsy.","commonSituations":"PrivateMode selected as agent provider but the base path was never saved; endpoint URL changed; .env updated but server not restarted.","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."],"exampleFix":"// before (.env)\nPRIVATEMODE_LLM_BASE_PATH=\n// after (.env)\nPRIVATEMODE_LLM_BASE_PATH=https://your-privatemode-endpoint/v1","handlingStrategy":"validation","validationCode":"function assertPrivatemodeReady(workspaceAgentProvider) {\n  const using = workspaceAgentProvider === 'privatemode' || process.env.LLM_PROVIDER === 'privatemode';\n  if (using && !process.env.PRIVATEMODE_LLM_BASE_PATH)\n    throw new Error('PRIVATEMODE_LLM_BASE_PATH missing - set it before starting an agent.');\n}","typeGuard":null,"tryCatchPattern":"try { await agent.init(); } catch (e) { if (/Privatemode base path must be provided/.test(e.message)) return showProviderConfig('privatemode'); throw e; }","preventionTips":["Validate base-path providers at boot.","Restart after .env edits.","Confirm the endpoint is reachable before enabling the provider."],"tags":["config","env","agent-provider","privatemode","local-llm","agents"],"backgroundTag":null,"analyzedSha":"526360e320da9d1b36074be5ed64fe76e5bbfbbd","analyzedAt":"2026-08-13T01:45:47.170Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}