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
- Wait for the in-flight installation to finish and re-check installed models
- If stuck (install crashed without cleanup), reload the extension window so the static set resets
- 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
- Debounce install buttons in UI layers
- Treat 'already being installed' as success/idempotent, not an error
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
- Model '${modelName}' is already being installed.
- '${modelName}' not found in the Ollama registry!
- Failed to fetch Ollama library: ${response.status}
- Error fetching tags: ${e.message}
- HTTP ${e.response.status} ${e.response.statusText} from ${e.
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/be0adc360e74cdb9.
Report an issue: GitHub.