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(quota): wire multi-provider icons into pool card (D3 dead-code gap)

diegosouzapwb93cde7507de
diff --git a/src/app/(dashboard)/dashboard/costs/quota-share/QuotaSharePageClient.tsx b/src/app/(dashboard)/dashboard/costs/quota-share/QuotaSharePageClient.tsx
index ccc84c505d..53ccf92454 100644
--- a/src/app/(dashboard)/dashboard/costs/quota-share/QuotaSharePageClient.tsx
+++ b/src/app/(dashboard)/dashboard/costs/quota-share/QuotaSharePageClient.tsx
@@ -82,6 +82,7 @@ function PoolCardWithUsage({
keyLabels,
connectionLabel,
provider,
+ providers,
onEdit,
onRemove,
}: {
@@ -89,6 +90,7 @@ function PoolCardWithUsage({
keyLabels: Record<string, string>;
connectionLabel: string;
provider: string;
+ providers?: string[];
onEdit: () => void;
onRemove: () => void;
}) {
@@ -100,6 +102,7 @@ function PoolCardWithUsage({
keyLabels={keyLabels}
connectionLabel={connectionLabel}
provider={provider}
+ providers={providers}
onEdit={onEdit}
onRemove={onRemove}
/>
@@ -287,6 +290,7 @@ export default function QuotaSharePageClient() {
keyLabels={keyLabels}
connectionLabel={connLabel(pool.connectionId)}
provider={connProvider(pool.connectionId)}
+ providers={[...new Set((pool.connectionIds ?? [pool.connectionId]).map(connProvider))]}
onEdit={() => setEditing(pool)}
onRemove={() => void handleRemovePool(pool.id)}
/>
diff --git a/tests/unit/quota-pool-wizard-multi.test.ts b/tests/unit/quota-pool-wizard-multi.test.ts
index ea792fc461..0228e6d992 100644
--- a/tests/unit/quota-pool-wizard-multi.test.ts
+++ b/tests/unit/quota-pool-wizard-multi.test.ts
@@ -194,6 +194,27 @@ for (const key of NEW_KEYS) {
});
}
+test("QuotaSharePageClient wires the multi-provider icons (providers prop is passed, not dead code)", () => {
+ const pageClientPath = path.join(
+ ROOT,
+ "src",
+ "app",
+ "(dashboard)",
+ "dashboard",
+ "costs",
+ "quota-share",
+ "QuotaSharePageClient.tsx"
+ );
+ const src = fs.readFileSync(pageClientPath, "utf8");
+ // The PoolCard providers prop must actually be populated by the parent from
+ // the pool's connectionIds — otherwise the multi-provider icon row never renders.
+ assert.ok(src.includes("providers={"), "parent must pass a providers prop to the card");
+ assert.ok(
+ /connectionIds\s*\?\?\s*\[pool\.connectionId\]/.test(src),
+ "providers must be derived from pool.connectionIds (falling back to the primary)"
+ );
+});
+
test("i18n parity: all quotaShare.wizard* keys are in sync between en and pt-BR", () => {
const enWizardKeys = Object.keys(en.quotaShare)
.filter((k) => k.startsWith("wizard"))