Mintplex-Labs/anything-llm · error
No PPIO API key was set.
Error message
No PPIO API key was set.
What it means
Configuration guard thrown by the PPIOLLM constructor: the PPIO provider was selected but the PPIO_API_KEY environment variable is empty/unset, so the PPIO inference endpoint cannot be authenticated against.
Solutions
- Set the PPIO API key in provider settings or env.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at provider construction when no PPIO API key is configured.
Common situations: PPIO selected as LLM provider without an API key.
AI-assisted analysis of Mintplex-Labs/anything-llm@f92433b4ea (2026-09-22).
Data as JSON: /api/errors/d9dc50596624904c.
Report an issue: GitHub.
Appendix: source
Thrown at server/utils/AiProviders/ppio/index.js:28
} = require("../../helpers/chat/LLMPerformanceMonitor");
const cacheFolder = path.resolve(
process.env.STORAGE_DIR
? path.resolve(process.env.STORAGE_DIR, "models", "ppio")
: path.resolve(__dirname, `../../../storage/models/ppio`)
);
function cachedPPIOModels() {
const cacheModelPath = path.resolve(cacheFolder, "models.json");
if (!fs.existsSync(cacheModelPath)) return {};
return safeJsonParse(
fs.readFileSync(cacheModelPath, { encoding: "utf-8" }),
{}
);
}
class PPIOLLM {
constructor(embedder = null, modelPreference = null) {
if (!process.env.PPIO_API_KEY) throw new Error("No PPIO API key was set.");
this.className = "PPIOLLM";
const { OpenAI: OpenAIApi } = require("openai");
this.basePath = "https://api.ppinfra.com/v3/openai/";
this.openai = new OpenAIApi({
baseURL: this.basePath,
apiKey: process.env.PPIO_API_KEY ?? null,
defaultHeaders: {
"HTTP-Referer": "https://anythingllm.com",
"X-API-Source": "anythingllm",
},
});
this.model =
modelPreference ||
process.env.PPIO_MODEL_PREF ||
"qwen/qwen2.5-32b-instruct";
this.limits = {
history: this.promptWindowLimit() * 0.15,View on GitHub (pinned to f92433b4ea)