Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(shared): a model-scoped Claude limit no longer blocks other Claude models #32016

Openna-zar(GitHub profile, opens in a new tab)wants to merge 6 commits intomain fromrefs/pull/32016/headopened View on GitHub

Showing 7 changed files with 67 additions and 0 deletions (loading 4).

x
0 of 7 viewed, 7 left
10 additions and 0 deletionspackages/shared/src/usageLimits.test.tsModified
View file
@@ -180,6 +180,16 @@
["opencode", "console-custom"],
["opencode", ["budget_all"], "opencode/model", false, undefined, []],
+ ["claudeAgent", ["seven_day_fable"], "claude-opus-5-5", false, undefined, undefined],
+ ["claudeAgent", ["seven_day_fable"], "claude-fable-5-1", true, undefined, undefined],
+ [
+ "claudeAgent",
+ ["seven_day", "seven_day_fable"],
+ "claude-opus-5-5",
+ true,
+ undefined,
+ undefined,
+ ],
] as const)(
"matches %s pools %s to %s",
(driver, ids, model, usesFallback, modelIds, providerIds) => {
8 additions and 0 deletionspackages/shared/src/usageLimits.tsModified
View file
@@ -70,6 +70,14 @@
return exhausted.find(
(window) => !window.id.startsWith("go_") || model.startsWith("opencode-go/"),
);
+ case "claudeAgent": {
+ // Model-scoped weekly buckets (`seven_day_<model>`, e.g. Fable) only cap that model.
+ const slug = model.toLowerCase().replace(/[^a-z0-9]+/g, "_");
+ return exhausted.find((window) => {
+ const scope = window.id.match(/^seven_day_(.+)$/)?.[1];