mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-07 07:42:13 +03:00
[v3.8.50] fix(open-sse): add 'has been exhausted' to CREDITS_EXHAUSTED_SIGNALS (fixes #8631) (#8704)
Validated in local merge-train T7 (ungrouped batch 2)
This commit is contained in:
@@ -184,6 +184,12 @@ export const CREDITS_EXHAUSTED_SIGNALS = [
|
||||
"out of credits",
|
||||
"payment required",
|
||||
"free tier of the model has been exhausted",
|
||||
// #8631: narrower than a bare "has been exhausted" — that generic phrase also
|
||||
// appears in Gemini's transient RPM/TPM 429 body ("Resource has been exhausted
|
||||
// (e.g. check quota)."), which must stay RATE_LIMIT_EXCEEDED, not terminal.
|
||||
// Anchoring on "tier" keeps free-tier depletion wording matched while excluding
|
||||
// Gemini's "resource has been exhausted" rate-limit phrasing.
|
||||
"tier has been exhausted",
|
||||
// #5239: providers (e.g. DeepSeek/GLM-style) return "Insufficient account balance"
|
||||
// on a depleted key. 402 is already terminalized by status, but catch non-402
|
||||
// out-of-credit bodies here too.
|
||||
|
||||
@@ -27,6 +27,11 @@ test("classifyProviderError: 400 + billing signal => QUOTA_EXHAUSTED", () => {
|
||||
error: { message: "insufficient_quota: exceeded your current quota" },
|
||||
});
|
||||
assert.equal(result, PROVIDER_ERROR_TYPES.QUOTA_EXHAUSTED);
|
||||
|
||||
const resultExhausted = classifyProviderError(400, {
|
||||
error: { message: "The free tier of the model has been exhausted." },
|
||||
});
|
||||
assert.equal(resultExhausted, PROVIDER_ERROR_TYPES.QUOTA_EXHAUSTED);
|
||||
});
|
||||
|
||||
test("classifyProviderError: Kimi billing-cycle 403 => QUOTA_EXHAUSTED", () => {
|
||||
|
||||
Reference in New Issue
Block a user