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(quota): seed claude plan preset (percent 5h+weekly) in planRegistry

diegosouzapwf8c121372259
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<string, KnownPlanShape> = {
{ 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: [