Mintplex-Labs/anything-llm · error

QDrant::Invalid ENV settings

Error message

QDrant::Invalid ENV settings

What it means

Environment guard at the top of QDrant.connect(): the vector DB client was constructed while process.env.VECTOR_DB is not 'qdrant', i.e. the QDrant provider code ran under a mismatched VECTOR_DB setting and refuses to connect to avoid using the wrong database.

Source

Thrown at server/utils/vectorDbProviders/qdrant/index.js:21

const { SystemSettings } = require("../../../models/systemSettings");
const { storeVectorResult, cachedVectorInformation } = require("../../files");
const { v4: uuidv4 } = require("uuid");
const { toChunks, getEmbeddingEngineSelection } = require("../../helpers");
const { sourceIdentifier } = require("../../chats");
const { VectorDatabase } = require("../base");

class QDrant extends VectorDatabase {
  constructor() {
    super();
  }

  get name() {
    return "QDrant";
  }

  async connect() {
    if (process.env.VECTOR_DB !== "qdrant")
      throw new Error("QDrant::Invalid ENV settings");

    const client = new QdrantClient({
      url: process.env.QDRANT_ENDPOINT,
      ...(process.env.QDRANT_API_KEY
        ? { apiKey: process.env.QDRANT_API_KEY }
        : {}),
    });

    const isAlive = (await client.api("cluster")?.clusterStatus())?.ok || false;
    if (!isAlive)
      throw new Error(
        "QDrant::Invalid Heartbeat received - is the instance online?"
      );

    return { client };
  }

  async heartbeat() {

View on GitHub (pinned to 3aec848f28)

Solutions

  1. Set the QDRANT_API_ENDPOINT and QDRANT_API_KEY environment variables.
Defensive patterns

Strategy: validation

When it happens

Trigger: QDrant was selected as the vector database but its environment settings are missing or invalid.

Common situations: This error is raised at runtime in server/utils/vectorDbProviders/qdrant/index.js. It occurs when the required configuration for this provider is missing or invalid (unset environment variables, empty API key or base path), when the external service is unreachable or returns an unexpected response, or when invalid input reaches the call site. To prevent it, validate the relevant provider settings and environment variables at startup and confirm the service is reachable before this code path executes.


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