Mintplex-Labs/anything-llm · error · 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 in DockerModelRunnerLLM: fires when the Docker Model Runner API base path environment variable is unset, so the provider has no OpenAI-compatible endpoint URL to build its client against and instantiation aborts before any chat or embedding call.

Solutions

  1. Set the Docker Model Runner base path in provider settings.
Defensive patterns

Strategy: validation

When it happens

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

Common situations: Docker Model Runner selected without a base path.


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

Appendix: 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 3aec848f28)