Mintplex-Labs/anything-llm · error · Error
An error occurred while uninstalling the model
Error message
An error occurred while uninstalling the model
What it means
Lemonade (AMD local LLM server) model uninstall UI. After a confirm dialog, LemonadeUtils.deleteModel(modelId, basePath) is called; a success:false result throws the util's error text or this generic fallback, and the catch toasts 'Error uninstalling model'.
Source
Thrown at frontend/src/components/LLMSelection/LemonadeOptions/index.jsx:272
setFilteredModels(Array.from(filteredModels.values()));
}, [searchQuery]);
async function uninstallModel(modelId) {
try {
if (
!window.confirm(
`Are you sure you want to uninstall this model? You will need to download it again to use it.`
)
)
return;
const { success, error } = await LemonadeUtils.deleteModel(
modelId,
basePath
);
if (!success)
throw new Error(
error || "An error occurred while uninstalling the model"
);
const updatedModels = customModels.map((model) =>
model.id === modelId ? { ...model, downloaded: false } : model
);
setCustomModels(updatedModels);
setFilteredModels(updatedModels);
setSearchQuery("");
} catch (e) {
console.error("Error uninstalling model:", e);
showToast(
e.message || "An error occurred while uninstalling the model",
"error",
{ clear: true }
);
} finally {
setLoading(false);View on GitHub (pinned to 3aec848f28)
Solutions
- Confirm the Lemonade server is running and reachable, then retry
- Refresh the model list — the id may already be gone (treat as success)
- Check the browser console/network tab for the DELETE request's status code and body
- Update Lemonade to a version whose API supports model deletion
Defensive patterns
Strategy: try-catch
Validate before calling
const serverUp = await LemonadeUtils.healthCheck?.(); const stillInstalled = customModels.some((m) => m.id === modelId && m.downloaded); if (!serverUp || !stillInstalled) return; // nothing actionable — refresh list instead
Try / catch
catch (e) {
console.error("Error uninstalling model:", e);
showToast(e.message, "error", { clear: true });
if (/not found|404/i.test(e.message)) markModelNotDownloaded(modelId); // idempotent outcome
} Prevention
- Treat 'model not found' during uninstall as success and refresh the list — deletes should be idempotent
- Confirm the Lemonade server is reachable before rendering uninstall actions
- Refresh the model list on modal open so stale ids are not acted upon
When it happens
Trigger: Lemonade server not running (default local port unreachable); modelId not actually downloaded locally; basePath invalid; the delete API returned an error status; Lemonade version lacking the delete endpoint.
Common situations: Lemonade stopped between listing and uninstalling; model already removed manually via CLI so the id is stale; version mismatch between the UI expectations and the installed Lemonade server; localhost server blocked by browser mixed-content rules.
Related errors
- An error occurred while downloading the model
- An error occurred while downloading the model
- modelId is required
- An error occurred while deleting the model
- Error downloading model: ${response.statusText}
AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18).
Data as JSON: /api/errors/dac546710c4e64e5.
Report an issue: GitHub.