Skip to content

Commit 33e1bb2

Browse files
fix(server): type the gated Codex quota read
AI-assisted; verified with the tests and tools listed above.
1 parent 50fb289 commit 33e1bb2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/server/src/provider/CodexProvider.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,10 @@ const probeCodexAppServerProvider = Effect.fn("probeCodexAppServerProvider")(fun
643643
!input.skipNativeUsage &&
644644
config !== undefined &&
645645
codexRoutesSpendNativeQuota(accountResponse, config.config);
646-
return (nativeUsage ? readCodexRateLimits(client, deadlineMs) : Effect.undefined).pipe(
646+
const readUsage: Effect.Effect<CodexRateLimitsProbe | undefined> = nativeUsage
647+
? readCodexRateLimits(client, deadlineMs)
648+
: Effect.undefined;
649+
return readUsage.pipe(
647650
Effect.map((rateLimits) => ({
648651
serviceTier: config?.config.service_tier ?? undefined,
649652
nativeUsage,

0 commit comments

Comments
 (0)