Mintplex-Labs/anything-llm · error · Error

An error occurred while downloading the model

Error message

An error occurred while downloading the model

What it means

Lemonade model download UI, mirroring the DMR one: after a size confirmation, LemonadeUtils.downloadModel(modelId, basePath, progressCallback) runs; success:false throws the util's error or this generic fallback, surfaced as a toast while console.error records the details.

Source

Thrown at frontend/src/components/LLMSelection/LemonadeOptions/index.jsx:308

      setLoading(false);
    }
  }

  async function downloadModel(modelId, fileSize, progressCallback) {
    try {
      if (
        !window.confirm(
          `Are you sure you want to download this model? It is ${fileSize} in size and may take a while to download.`
        )
      )
        return;
      const { success, error } = await LemonadeUtils.downloadModel(
        modelId,
        basePath,
        progressCallback
      );
      if (!success)
        throw new Error(
          error || "An error occurred while downloading the model"
        );
      progressCallback(100);
      handleSetActiveModel(modelId);

      const existingModels = [...customModels];
      const newModel = existingModels.find((model) => model.id === modelId);
      if (newModel) {
        newModel.downloaded = true;
        setCustomModels(existingModels);
        setFilteredModels(existingModels);
        setSearchQuery("");
      }
    } catch (e) {
      console.error("Error downloading model:", e);
      showToast(
        e.message || "An error occurred while downloading the model",
        "error",

View on GitHub (pinned to 3aec848f28)

Solutions

  1. Verify the Lemonade server is up, then retry the download
  2. Check console/network for the exact failure (HTTP status from Lemonade or HF)
  3. Ensure disk space for the advertised file size and a stable connection (disable VPN/proxy if it blocks HF)
  4. Confirm the model id is valid by refreshing the Lemonade catalog list
Defensive patterns

Strategy: try-catch

Validate before calling

const serverUp = await LemonadeUtils.healthCheck?.();
if (!serverUp) return showToast("Start the Lemonade server before downloading", "error");
if (!hasDiskSpace(fileSize)) return showToast("Not enough disk space for this model", "error");

Try / catch

catch (e) {
  console.error("Error downloading model:", e);
  showToast(e.message, "error", { clear: true });
  if (/network|fetch|ECONN/i.test(e.message)) offerRetry(handleDownload);
}

Prevention

When it happens

Trigger: Lemonade server down or unreachable; Hugging Face download failure (network/proxy, rate limit, model id unavailable); disk space insufficient; basePath invalid; progress stream aborted mid-download.

Common situations: Lemonade not started before clicking download; corporate proxy blocking huggingface.co; disk full; model id pulled from a stale list; long download interrupted by machine sleep.

Related errors


AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18). Data as JSON: /api/errors/d64bf727b5b6cee6. Report an issue: GitHub.