The best way to control Claude Code, Codex and more from any computer or phone
fix(server): a Claude account with no rate-limit data no longer stays unsupported (#18624)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>
fixfon committed
Oct 20, 2026 at 03:28 UTC
2b6c291be9311f00b505146aa15c8b318587c89d
2 files changed
+21
-9
apps/server/src/provider/claudeUsageLimits.test.ts
+17
-8
@@ -86,14 +86,23 @@ describe("claudeUsageResponseToLimits", () => {
86
).toEqual({ overageIncluded: "Fable" });
87
});
88
89
- it("reports API key and Bedrock accounts as unsupported", () => {
90
- expect(
91
- claudeUsageResponseToLimits({
92
- checkedAt,
93
- response: { rate_limits_available: false, rate_limits: null },
94
- }).limits,
95
- ).toEqual({ checkedAt, windows: [], unavailable: { reason: "unsupported" } });
96
- });
89
+ it.each([
90
+ { rateLimitsAvailable: false, reason: "unsupported" },
91
+ { rateLimitsAvailable: true, reason: "probeFailed" },
92
+ ])(
93
+ "reports null usage as $reason when availability is $rateLimitsAvailable",
94
+ ({ rateLimitsAvailable, reason }) => {
95
+ expect(
96
+ claudeUsageResponseToLimits({
97
+ checkedAt,
98
+ response: { rate_limits_available: rateLimitsAvailable, rate_limits: null },
99
+ }),
100
+ ).toEqual({
101
+ limits: { checkedAt, windows: [], unavailable: { reason } },
102
+ names: noNames,
103
+ });
104
+ },
105
+ );
106
107
it("skips a window the endpoint reports without a utilization", () => {
108
expect(
apps/server/src/provider/claudeUsageLimits.ts
+4
-1
@@ -142,7 +142,10 @@ export function claudeUsageResponseToLimits(input: {
142
const { response, checkedAt } = input;
143
if (!response.rate_limits_available || !response.rate_limits) {
144
return {
145
- limits: makeUnavailableUsageLimits({ checkedAt, reason: "unsupported" }),
145
+ limits: makeUnavailableUsageLimits({
146
+ checkedAt,
147
+ reason: response.rate_limits_available ? "probeFailed" : "unsupported",
148
+ }),
149
names: { overageIncluded: undefined },
150
};
151
}