GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(shared): a zero-credit cap no longer marks seat-based Codex out o… · pingdotgg/t3code@c99cd28

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/shared/src
    • usageLimits.test.ts
    • usageLimits.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/shared/src/usageLimits.test.ts‎

Copy file name to clipboardExpand all lines: packages/shared/src/usageLimits.test.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ describe("new thread model fallback", () => {
130130
["antigravity", ["gemini-weekly"], "claude-opus-5-5", false],
131131
["antigravity", ["3p-weekly"], "claude-opus-5-5", true],
132132
["antigravity", ["gemini-weekly"], "antigravity-default", true],
133+
["codex", ["individual"], "gpt-5.5", true],
133134
["opencode", ["go_weekly"], "opencode/big-pickle", false],
134135
["opencode", ["go_weekly"], "opencode-go/big-pickle", true],
135136
] as const)("matches %s pools %s to %s", (driver, ids, model, usesFallback) => {
Collapse file

‎packages/shared/src/usageLimits.ts‎

Copy file name to clipboardExpand all lines: packages/shared/src/usageLimits.ts
+9-1Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ export function exhaustedUsageWindow(
2828
now: number,
2929
model?: string,
3030
) {
31-
const exhausted = (provider?.usageLimits?.windows ?? []).filter(
31+
const windows = provider?.usageLimits?.windows ?? [];
32+
const exhausted = windows.filter(
3233
(window) =>
3334
(window.usedPercent ?? 0) >= 100 &&
3435
(!window.resetsAt ||
@@ -54,6 +55,13 @@ export function exhaustedUsageWindow(
5455
);
5556
});
5657
}
58+
case "codex": {
59+
// Seat-based plans spend credits only past their plan windows, so the credit cap blocks only plans without them.
60+
const hasPlanWindows = windows.some(
61+
(window) => window.id === "primary" || window.id === "secondary",
62+
);
63+
return exhausted.find((window) => window.id !== "individual" || !hasPlanWindows);
64+
}
5765
case "opencode":
5866
return exhausted.find(
5967
(window) => !window.id.startsWith("go_") || model.startsWith("opencode-go/"),

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.