Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/server/src/provider/CodexProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ export const checkCodexProviderStatus = Effect.fn("checkCodexProviderStatus")(fu
? makeUnavailableUsageLimits({
checkedAt,
reason: "probeFailed",
...(accountStatus.message ? { message: accountStatus.message } : {}),
...(snapshot.rateLimits ? { message: snapshot.rateLimits.failure } : {}),
})
: codexRateLimitsToLimits({
Expand Down
6 changes: 6 additions & 0 deletions apps/server/src/provider/ProviderRegistry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { HttpClient, HttpClientResponse } from "effect/http";
import { ChildProcessSpawner } from "effect/process";
import { deepMerge } from "@t3tools/shared/Struct";
import { createModelCapabilities } from "@t3tools/shared/model";
import { limitsNotice } from "@t3tools/shared/usageLimits";
import { applyServerSettingsPatch } from "@t3tools/shared/serverSettings";

import { checkCodexProviderStatus, type CodexAppServerProviderSnapshot } from "./CodexProvider.ts";
Expand Down Expand Up @@ -488,6 +489,11 @@ it.layer(
status.message,
"Codex CLI is not authenticated. Run `codex login` and try again.",
);
assert.isDefined(status.usageLimits);
assert.strictEqual(
limitsNotice(status.usageLimits!),
"Codex CLI is not authenticated. Run `codex login` and try again.",
);
}),
);

Expand Down
Loading