Mintplex-Labs/anything-llm · error · Error

No Privatemode Base Path was set.

Error message

No Privatemode Base Path was set.

What it means

Configuration guard thrown by the PrivatemodeLLM constructor: the Privatemode provider is active but PRIVATEMODE_LLM_BASE_PATH is empty/unset, so the privacy-focused inference endpoint URL is unknown and the client cannot be constructed.

Solutions

  1. Set the Privatemode base path in provider settings.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at provider construction when no Privatemode base path is configured.

Common situations: Privatemode selected without a base path.


AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18). Data as JSON: /api/errors/22b4eceb5654accc. Report an issue: GitHub.

Appendix: source

Thrown at server/utils/AiProviders/privatemode/index.js:21

  handleDefaultStreamResponseV2,
  formatChatHistory,
} = require("../../helpers/chat/responses");
const {
  LLMPerformanceMonitor,
} = require("../../helpers/chat/LLMPerformanceMonitor");

class PrivatemodeLLM {
  static contextWindows = {
    "leon-se/gemma-3-27b-it-fp8-dynamic": 128000,
    "gemma-3-27b": 128000,
    "qwen3-coder-30b-a3b": 128000,
    "gpt-oss-120b": 128000,
    "openai/gpt-oss-120b": 128000,
  };

  constructor(embedder = null, modelPreference = null) {
    if (!process.env.PRIVATEMODE_LLM_BASE_PATH)
      throw new Error("No Privatemode Base Path was set.");

    this.className = "PrivatemodeLLM";
    const { OpenAI: OpenAIApi } = require("openai");
    this.client = new OpenAIApi({
      baseURL: PrivatemodeLLM.parseBasePath(),
      apiKey: null,
    });

    this.model = modelPreference || process.env.PRIVATEMODE_LLM_MODEL_PREF;
    this.limits = {
      history: this.promptWindowLimit() * 0.15,
      system: this.promptWindowLimit() * 0.15,
      user: this.promptWindowLimit() * 0.7,
    };

    this.embedder = embedder ?? new NativeEmbedder();
    this.defaultTemp = 0.7;
    this.log(

View on GitHub (pinned to 3aec848f28)