Mintplex-Labs/anything-llm · error · Error

No workspace agent provider set. Please set your agent provi

Error message

No workspace agent provider set. Please set your agent provider in the workspace's settings

What it means

Thrown by checkSetup()'s default case (server/utils/agents/index.js:295) when this.provider is a non-empty string that matches no supported provider case. This is distinct from the null-provider throws in #fetchModel/#providerSetupAndCheck: here a provider IS set but is unrecognized, deprecated, renamed, or otherwise not in the switch.

Source

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

        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
   * it will return a reasonable base model for the provider if one exists.
   * @param {string} provider - The provider to find the default model for.
   * @returns {string|null} The default model for the provider.
   */
  providerDefault(provider = this.provider) {
    switch (provider) {
      case "openai":
        return process.env.OPEN_MODEL_PREF ?? "gpt-4.1-nano";
      case "anthropic":
        return process.env.ANTHROPIC_MODEL_PREF ?? "claude-sonnet-4-6";
      case "lmstudio":

View on GitHub (pinned to 526360e320)

Solutions

  1. Open Workspace Settings -> Agent Configuration and re-select a currently supported provider.
  2. If LLM_PROVIDER is the source, correct its value in .env to a supported provider id and restart.
  3. For stale DB values, set the workspace row's agentProvider to null or a current provider id.
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED_PROVIDERS = new Set(['openai','anthropic','azure','ollama','lmstudio','groq','togetherai','mistral','openrouter','generic-openai','perplexity','textgenwebui','bedrock','fireworksai','deepseek','litellm','apipie','xai','zai','novita','nvidia-nim','ppio','gemini','moonshotai','cometapi','foundry','giteeai','cohere','docker-model-runner','privatemode','sambanova','lemonade','omlx','minimax','cerebras','koboldcpp','localai','anythingllm-router']);
function isValidProvider(p) { return typeof p === 'string' && SUPPORTED_PROVIDERS.has(p); }
if (provider && !isValidProvider(provider)) return rejectProvider(provider);

Try / catch

try { await agent.init(); } catch (e) { if (/No workspace agent provider set/.test(e.message)) return reconfigureProvider(); throw e; }

Prevention

When it happens

Trigger: workspace.agentProvider (or system LLM_PROVIDER) holds a value not present in the switch - a typo, a removed/renamed provider id from another version, or an all-whitespace string that bypassed the !provider check.

Common situations: Upgrading/downgrading AnythingLLM where a provider id was renamed/removed but the DB still stores the old value; manual DB edit of agentProvider; typo in .env LLM_PROVIDER.

Related errors


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