Repository navigation
Commit c99cd28
committed
fix(shared): a zero-credit cap no longer marks seat-based Codex out of usage
Codex reports a monthly credit cap (individualLimit) beside the 5-hour and
weekly plan windows. On a seat-based workspace that gives members no
credits, that cap reads 0 of 0 and maps to a 100%-used monthly window, so
exhaustedUsageWindow called the whole provider exhausted and new threads,
text generation and MCP thread creation switched to the fallback model.
Credits only pay for use past the plan windows, so the credit cap now
counts as exhausting Codex only when no plan windows are reported (usage-
based Enterprise plans). Plan windows at 100% still exhaust it.
Fixes #34234
AI-assisted; verified with the tests and tools listed above.1 parent 7e440fe commit c99cd28
2 files changed
Lines changed: 10 additions & 1 deletion
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
| |||
0 commit comments