Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(antigravity): rate-limited turns keep their reset time #29594

Mergedsaphid(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/29594/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 22 additions and 3 deletions.

x
0 of 2 viewed, 2 left
18 additions and 2 deletionsapps/server/src/provider/acp/AntigravityTurnOutcome.test.tsModified
View file
@@ -22,9 +22,12 @@
`Agent execution terminated due to error.\u0012agent executor error: ${error}: ${error}\n(1) attached stack trace\n -- stack trace:`,
),
]);
-// An unparsable reset timestamp must not hide the reset delay.
+// An unparsable reset timestamp must not hide the reset delay, nor a retry delay outrank it.
const QUOTA_ERROR = errorPayload(
- "Error 429, Message: Quota exhausted for test model., Status: RESOURCE_EXHAUSTED, Details: [map[@type:type.googleapis.com/google.rpc.ErrorInfo domain:googleapis.com metadata:map[quotaResetDelay:3600s quotaResetTimeStamp:soon] reason:QUOTA_EXHAUSTED]]",
+ "Error 429, Message: Quota exhausted for test model., Status: RESOURCE_EXHAUSTED, Details: [map[@type:type.googleapis.com/google.rpc.RetryInfo retryDelay:42s] map[@type:type.googleapis.com/google.rpc.ErrorInfo domain:googleapis.com metadata:map[quotaResetDelay:3600s quotaResetTimeStamp:soon] reason:QUOTA_EXHAUSTED]]",
+);
+const RATE_LIMIT_ERROR = errorPayload(
+ "Error 429, Message: Resource has been exhausted (e.g. check quota)., Status: RESOURCE_EXHAUSTED, Details: [map[@type:type.googleapis.com/google.rpc.ErrorInfo domain:cloudcode-pa.googleapis.com reason:RATE_LIMIT_EXCEEDED] map[@type:type.googleapis.com/google.rpc.RetryInfo retryDelay:42s]]",
);
const INVALID_ARGUMENT_ERROR = errorPayload(
"Error 400, Message: Request contains an invalid argument., Status: INVALID_ARGUMENT, Details: []",
@@ -101,6 +104,19 @@
+ assert.deepEqual(
+ yield* turn([
+ [USER_INPUT, input],
+ [ERROR_MESSAGE, RATE_LIMIT_ERROR],
+ ]),
+ {
+ class: "usage_limit",
+ message: "Resource has been exhausted (e.g. check quota).",
+ code: "RESOURCE_EXHAUSTED",
+ retryable: true,