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

feat: extract shared auth utility and fix custom provider model resolution

nyatoru2a90a0513226
diff --git a/src/app/(dashboard)/dashboard/providers/[id]/page.tsx b/src/app/(dashboard)/dashboard/providers/[id]/page.tsx
index 3e56f81d1f..80b6794c46 100644
--- a/src/app/(dashboard)/dashboard/providers/[id]/page.tsx
+++ b/src/app/(dashboard)/dashboard/providers/[id]/page.tsx
@@ -1511,7 +1511,7 @@ function CompatibleModelsSection({
});
if (!customModelRes.ok) {
- let errorData = {};
+ let errorData: { error?: { message?: string } } = {};
try {
errorData = await customModelRes.json();
} catch (jsonError) {
@@ -1519,7 +1519,6 @@ function CompatibleModelsSection({
}
throw new Error(errorData.error?.message || "Failed to save custom model");
}
- }
// Only create alias after customModel is saved successfully
await onSetAlias(modelId, resolvedAlias, providerStorageAlias);