Mintplex-Labs/anything-llm · error · Error

OMLX base path must be provided to use agents.

Error message

OMLX base path must be provided to use agents.

What it means

Thrown by checkSetup() (server/utils/agents/index.js:128) when the resolved agent provider is 'omlx' but process.env.OMLX_LLM_BASE_PATH is unset/empty. It is a precondition gate in agent.init() ensuring the OMLX endpoint is configured before use.

Source

Thrown at server/utils/agents/index.js:285

          );
        break;
      case "privatemode":
        if (!process.env.PRIVATEMODE_LLM_BASE_PATH)
          throw new Error(
            "Privatemode base path must be provided to use agents."
          );
        break;
      case "sambanova":
        if (!process.env.SAMBANOVA_LLM_API_KEY)
          throw new Error("SambaNova API key must be provided to use agents.");
        break;
      case "lemonade":
        if (!process.env.LEMONADE_LLM_BASE_PATH)
          throw new Error("Lemonade base path must be provided to use agents.");
        break;
      case "omlx":
        if (!process.env.OMLX_LLM_BASE_PATH)
          throw new Error("OMLX base path must be provided to use agents.");
        break;
      case "minimax":
        if (!process.env.MINIMAX_API_KEY)
          throw new Error("Minimax API key must be provided to use agents.");
        break;
      case "cerebras":
        if (!process.env.CEREBRAS_API_KEY)
          throw new Error("Cerebras API key must be provided to use agents.");
        break;
      default:
        throw new Error(
          "No workspace agent provider set. Please set your agent provider in the workspace's settings"
        );
    }
  }

  /**
   * Finds the default model for a given provider. If no default model is set for it's associated ENV then

View on GitHub (pinned to 526360e320)

Solutions

  1. Set OMLX_LLM_BASE_PATH in .env to the OMLX endpoint and restart the server.
  2. Confirm the endpoint is reachable.
  3. Switch provider if OMLX is not intended.

Example fix

// before (.env)
OMLX_LLM_BASE_PATH=
// after (.env)
OMLX_LLM_BASE_PATH=http://your-omlx-host/v1
Defensive patterns

Strategy: validation

Validate before calling

function assertOmlxReady(workspaceAgentProvider) {
  const using = workspaceAgentProvider === 'omlx' || process.env.LLM_PROVIDER === 'omlx';
  if (using && !process.env.OMLX_LLM_BASE_PATH)
    throw new Error('OMLX_LLM_BASE_PATH missing - set it before starting an agent.');
}

Try / catch

try { await agent.init(); } catch (e) { if (/OMLX base path must be provided/.test(e.message)) return showProviderConfig('omlx'); throw e; }

Prevention

When it happens

Trigger: A chat turn calls agent.init(); this.provider resolves to 'omlx'; case 'omlx' runs and process.env.OMLX_LLM_BASE_PATH is falsy.

Common situations: OMLX selected as agent provider but base path never saved; endpoint URL changed; .env updated but server not restarted.

Related errors


AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13). Data as JSON: /api/errors/ee0255240aaa4ee3. Report an issue: GitHub.