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: resolve maxConcurrent display and binding bug (#1859)

diegosouzapw41ff569260ea
diff --git a/src/app/(dashboard)/dashboard/providers/[id]/page.tsx b/src/app/(dashboard)/dashboard/providers/[id]/page.tsx
index 34c9cc37cc..5e118a8764 100644
--- a/src/app/(dashboard)/dashboard/providers/[id]/page.tsx
+++ b/src/app/(dashboard)/dashboard/providers/[id]/page.tsx
@@ -5151,6 +5151,15 @@ function ConnectionRow({
{t("autoPriority", { priority: connection.globalPriority })}
</span>
)}
+ {connection.maxConcurrent != null && connection.maxConcurrent > 0 && (
+ <span
+ className="inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-xs font-medium bg-zinc-500/15 text-zinc-500 dark:bg-zinc-400/15 dark:text-zinc-400"
+ title={t("accountConcurrencyCapLabel")}
+ >
+ <span className="material-symbols-outlined text-[11px]">dynamic_feed</span>
+ {connection.maxConcurrent}
+ </span>
+ )}
{/* Rate Limit Protection — inline toggle with label */}
<span className="text-text-muted/30 select-none">|</span>
<button
diff --git a/src/app/api/providers/[id]/route.ts b/src/app/api/providers/[id]/route.ts
index e826d35366..37f1f8ec90 100644
--- a/src/app/api/providers/[id]/route.ts
+++ b/src/app/api/providers/[id]/route.ts
@@ -124,6 +124,8 @@ export async function PUT(request: Request, { params }: { params: Promise<{ id:
rateLimitedUntil,
lastTested,
healthCheckInterval,
+ group,
+ maxConcurrent,
providerSpecificData: incomingPsd,
} = body;
@@ -148,6 +150,8 @@ export async function PUT(request: Request, { params }: { params: Promise<{ id:
if (rateLimitedUntil !== undefined) updateData.rateLimitedUntil = rateLimitedUntil;
if (lastTested !== undefined) updateData.lastTested = lastTested;
if (healthCheckInterval !== undefined) updateData.healthCheckInterval = healthCheckInterval;
+ if (group !== undefined) updateData.group = group;
+ if (maxConcurrent !== undefined) updateData.maxConcurrent = maxConcurrent;
// Merge providerSpecificData (partial update — preserve existing keys not sent by caller)
if (incomingPsd !== undefined && incomingPsd !== null && typeof incomingPsd === "object") {