From f8c12137225930ce806d92c8ad65d64bdfd45787 Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Tue, 2 Jun 2026 05:06:34 -0300 Subject: [PATCH] feat(quota): seed claude plan preset (percent 5h+weekly) in planRegistry Claude Code (Pro/Max) is a percentage-of-plan quota (5h rolling + weekly cap, shared Claude+Code); exact token caps are unpublished/task-variable so percent is the practical unit. Unblocks the PoolWizard 'Limite' pre-fill for claude pools. Researched plan structures (codex/claude/glm/kimi/minimax/xiaomi) captured in the quota-share redesign plan. --- src/lib/quota/planRegistry.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib/quota/planRegistry.ts b/src/lib/quota/planRegistry.ts index 0c2545ff21..ad6c3c246b 100644 --- a/src/lib/quota/planRegistry.ts +++ b/src/lib/quota/planRegistry.ts @@ -13,6 +13,17 @@ const KNOWN_PLANS: Record = { { unit: "percent", window: "weekly", limit: 100 }, ], }, + // Claude Code (Pro / Max 5x / Max 20x) is a percentage-of-plan quota over a 5h + // rolling window + a weekly cap, shared across Claude and Claude Code. The exact + // token caps are not published and vary by task, so % is the practical unit; the + // provider reports % used and fair-share attributes it across keys by local count. + claude: { + provider: "claude", + dimensions: [ + { unit: "percent", window: "5h", limit: 100 }, + { unit: "percent", window: "weekly", limit: 100 }, + ], + }, glm: { provider: "glm", dimensions: [