Mintplex-Labs/anything-llm · error · Error
Pinecone::Invalid ENV settings
Error message
Pinecone::Invalid ENV settings
What it means
Environment guard in PineconeDB.connect: the VECTOR_DB environment variable is not 'pinecone', so the running instance is configured for a different vector database and this connector refuses to operate against it.
Source
Thrown at server/utils/vectorDbProviders/pinecone/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 PineconeDB extends VectorDatabase {
constructor() {
super();
}
get name() {
return "Pinecone";
}
async connect() {
if (process.env.VECTOR_DB !== "pinecone")
throw new Error("Pinecone::Invalid ENV settings");
const client = new Pinecone({
apiKey: process.env.PINECONE_API_KEY,
});
const pineconeIndex = client.Index(process.env.PINECONE_INDEX);
const { status } = await client.describeIndex(process.env.PINECONE_INDEX);
if (!status.ready) throw new Error("Pinecone::Index not ready.");
return { client, pineconeIndex, indexName: process.env.PINECONE_INDEX };
}
async totalVectors() {
const { pineconeIndex } = await this.connect();
const { namespaces } = await pineconeIndex.describeIndexStats();
return Object.values(namespaces).reduce(
(a, b) => a + (b?.recordCount || 0),View on GitHub (pinned to 3aec848f28)
Solutions
- Set the PINECONE_API_KEY and PINECONE_INDEX environment variables.
Defensive patterns
Strategy: validation
When it happens
Trigger: Pinecone 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/pinecone/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/62dc65645a47f58e.
Report an issue: GitHub.