continuedev/continue · warning · Error

Model '${modelName}' is already being installed.

Error message

Model '${modelName}' is already being installed.

What it means

Thrown by Ollama.installModel under a mutex guarding concurrent installs: the model name is already in the static modelsBeingInstalled set, so a second install request for the same model is rejected instead of duplicating work.

Source

Thrown at core/llm/llms/Ollama.ts:773

      throw new Error("Ollama generated empty embedding");
    }
    return embedding;
  }

  public async installModel(
    modelName: string,
    signal: AbortSignal,
    progressReporter?: (task: string, increment: number, total: number) => void,
  ): Promise<any> {
    const modelInfo = await getRemoteModelInfo(modelName, signal);
    if (!modelInfo) {
      throw new Error(`'${modelName}' not found in the Ollama registry!`);
    }

    const release = await Ollama.modelsBeingInstalledMutex.acquire();
    try {
      if (Ollama.modelsBeingInstalled.has(modelName)) {
        throw new Error(`Model '${modelName}' is already being installed.`);
      }
      Ollama.modelsBeingInstalled.add(modelName);
    } finally {
      release();
    }

    try {
      const response = await fetch(this.getEndpoint("api/pull"), {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          Authorization: `Bearer ${this.apiKey}`,
        },
        body: JSON.stringify({ name: modelName }),
        signal,
      });

      const reader = response.body?.getReader();

View on GitHub (pinned to 5522c6f44c)

Solutions

  1. Wait for the in-flight installation to finish and re-check installed models
  2. If stuck (install crashed without cleanup), reload the extension window so the static set resets
  3. Debounce/deduplicate install triggers in your code
Defensive patterns

Strategy: validation

Validate before calling

if (Ollama.modelsBeingInstalled.has(modelName)) {
  log.info(`Install already in progress for ${modelName}; waiting`);
  await waitForInstall(modelName);
} else {
  await Ollama.installModel(modelName, signal);
}

Type guard

function isDuplicateInstall(e: unknown): boolean { return e instanceof Error && /already being installed/.test(e.message); }

Try / catch

try { await Ollama.installModel(name, signal); }
catch (e) { if (isDuplicateInstall(e)) return; /* idempotent success */ throw e; }

Prevention

When it happens

Trigger: Two install requests for the same modelName racing — e.g. double-clicking install in the UI, or an autocomplete/indexing flow requesting the same model while a user-triggered install is in flight.

Common situations: UI double-submission, or a retry loop that fires before the first install completes (or fails without cleanup).

Related errors


AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27). Data as JSON: /api/errors/be0adc360e74cdb9. Report an issue: GitHub.