Mintplex-Labs/anything-llm · error · Error
No OMLX API Base Path was set.
Error message
No OMLX API Base Path was set.
What it means
Configuration guard thrown by the OMLXLLM constructor: the OMLX provider was selected, but the OMLX_LLM_BASE_PATH environment variable is empty/unset, so the OpenAI-compatible client for the oMLX inference server has no endpoint to connect to.
Solutions
- Set the OMLX API base path in provider settings.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at provider construction when no OMLX base path is configured.
Common situations: OMLX selected without a base path.
AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18).
Data as JSON: /api/errors/1ddd3894db5b9232.
Report an issue: GitHub.
Appendix: source
Thrown at server/utils/AiProviders/omlx/index.js:21
handleDefaultStreamResponseV2,
formatChatHistory,
} = require("../../helpers/chat/responses");
const {
LLMPerformanceMonitor,
} = require("../../helpers/chat/LLMPerformanceMonitor");
const { OpenAI: OpenAIApi } = require("openai");
/**
* OMLX (oMLX) is an OpenAI-compatible MLX inference server for Apple Silicon.
* https://github.com/jundot/omlx
*/
class OMLXLLM {
/** @see OMLXLLM.cacheContextWindows */
static modelContextWindows = {};
constructor(embedder = null, modelPreference = null) {
if (!process.env.OMLX_LLM_BASE_PATH)
throw new Error("No OMLX API Base Path was set.");
this.className = "OMLXLLM";
this.omlx = new OpenAIApi({
baseURL: parseOMLXBasePath(process.env.OMLX_LLM_BASE_PATH),
apiKey: process.env.OMLX_LLM_API_KEY || null,
});
this.model = modelPreference || process.env.OMLX_LLM_MODEL_PREF;
if (!this.model) throw new Error("OMLX must have a valid model set.");
this.embedder = embedder ?? new NativeEmbedder();
this.defaultTemp = 0.7;
// Lazy load the limits to avoid blocking the main thread on cacheContextWindows
this.limits = null;
OMLXLLM.cacheContextWindows(true);
this.#log(`initialized with model: ${this.model}`);View on GitHub (pinned to 3aec848f28)