mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-01 12:52:11 +03:00
fix(antigravity): exclude standard Gemini rate limit message from quota exhaustion keywords (#4810)
Integrated into release/v3.8.36
This commit is contained in:
@@ -53,7 +53,6 @@ const CREDITS_EXHAUSTED_KEYWORDS = [
|
||||
"minimumcreditamountforusage",
|
||||
"minimum credit amount for usage",
|
||||
"minimum credit",
|
||||
"resource has been exhausted",
|
||||
];
|
||||
|
||||
const SHORT_COOLDOWN_MS = 5 * 60 * 1000; // 5 minutes
|
||||
|
||||
@@ -55,6 +55,17 @@ test("classify429: AG 'Individual quota reached' message → quota_exhausted", (
|
||||
assert.equal(classify429(msg), "quota_exhausted");
|
||||
});
|
||||
|
||||
test("classify429: standard Gemini rate limit 'resource has been exhausted' -> rate_limited or unknown, not quota_exhausted", () => {
|
||||
const msg =
|
||||
"RESOURCE_EXHAUSTED: Resource has been exhausted (e.g. queries per minute limit was reached).";
|
||||
const result = classify429(msg);
|
||||
assert.notEqual(
|
||||
result,
|
||||
"quota_exhausted",
|
||||
"RESOURCE_EXHAUSTED rate limit should not be classified as quota_exhausted"
|
||||
);
|
||||
});
|
||||
|
||||
// ── DB persistence (the missing wire — Bug #2) ───────────────────────────────
|
||||
|
||||
test("markConnectionQuotaExhausted persists 24h cooldown; isConnectionRateLimited returns true", async () => {
|
||||
|
||||
Reference in New Issue
Block a user