Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix: Clear All Models button now also removes associated aliases

R.D.81212388727a
diff --git a/src/app/(dashboard)/dashboard/providers/[id]/page.tsx b/src/app/(dashboard)/dashboard/providers/[id]/page.tsx
index a20e14d2e1..2bdb4c71c6 100644
--- a/src/app/(dashboard)/dashboard/providers/[id]/page.tsx
+++ b/src/app/(dashboard)/dashboard/providers/[id]/page.tsx
@@ -1553,7 +1553,19 @@ export default function ProviderDetailPage() {
{ method: "DELETE" }
);
if (res.ok) {
+ // Also delete all aliases that belong to this provider
+ const aliasEntries = Object.entries(modelAliases).filter(([, model]) =>
+ (model as string).startsWith(`${providerStorageAlias}/`)
+ );
+ await Promise.all(
+ aliasEntries.map(([alias]) =>
+ fetch(`/api/models/alias?alias=${encodeURIComponent(alias)}`, {
+ method: "DELETE",
+ }).catch(() => {})
+ )
+ );
await fetchProviderModelMeta();
+ await fetchAliases();
notify.success(t("clearAllModelsSuccess"));
} else {
notify.error(t("clearAllModelsFailed"));