Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Codex usage-limit stops take the reset time shown in Limits #14889

ClosedJonasFocus(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/14889/headopened View on GitHub

Showing 4 changed files with 93 additions and 13 deletions (loading 1).

x
0 of 4 viewed, 4 left
68 additions and 7 deletionsapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsModified
View file
@@ -1620,6 +1620,7 @@
onEvent: (event: ProviderAdapterV2Event) => Effect.Effect<unknown> = () => Effect.void,
onRequest: (method: string, params: unknown) => Effect.Effect<void> = () => Effect.void,
readChildMetadata?: (threadId: string) => Effect.Effect<unknown>,
+ getUsageLimits?: CodexAdapterV2.CodexAdapterV2Options["getUsageLimits"],
Effect.gen(function* () {
const fileSystem = yield* FileSystem.FileSystem;
@@ -1671,6 +1672,7 @@
continuationRequests.push(request);
+ ...(getUsageLimits ? { getUsageLimits } : {}),
const threadId = ThreadId.make(`thread-${transcript.scenario}`);
const runtime = yield* adapter.openSession({
@@ -5557,6 +5559,18 @@
expectedClass: "usage_limit",
{ name: "retry", code: "usageLimitExceeded", notification: true, expectedClass: "usage_limit" },
+ {
+ name: "published-reset",
+ code: "usageLimitExceeded",
+ notification: false,
+ expectedClass: "usage_limit",
+ },
+ {
+ name: "expired-session-reset",