fix: 延长 Sub2API 错误冷却时间

This commit is contained in:
Codex
2026-06-09 10:21:05 +00:00
parent 3c2ac07716
commit 7dd7b893ed
5 changed files with 30 additions and 33 deletions
+14 -14
View File
@@ -646,44 +646,44 @@ export function defaultCodexTempUnschedulablePolicy(): CodexTempUnschedulablePol
{
statusCode: 401,
keywords: ["unauthorized", "invalid api key", "invalid_api_key", "authentication"],
durationMinutes: 30,
description: "Credential/auth failures should leave the scheduler quickly and retry after a cooldown.",
durationMinutes: 120,
description: "Credential/auth failures should leave the scheduler quickly and retry after a two-hour cooldown.",
},
{
statusCode: 403,
keywords: ["forbidden", "access denied", "quota", "billing", "capacity"],
durationMinutes: 30,
description: "Permission, quota, or account-state failures should fail over to another account.",
durationMinutes: 120,
description: "Permission, quota, or account-state failures should fail over to another account for at least two hours.",
},
{
statusCode: 429,
keywords: ["capacity", "rate limit", "rate_limit", "quota", "too many requests", "overloaded", "resource_exhausted"],
durationMinutes: 10,
description: "Capacity and rate-limit responses should cool down this account and use another account.",
durationMinutes: 120,
description: "Capacity and rate-limit responses should cool down this account for at least two hours and use another account.",
},
{
statusCode: 500,
keywords: ["capacity", "overloaded", "temporarily unavailable", "temporary", "upstream"],
durationMinutes: 5,
description: "Transient upstream server failures should prefer another account for a short period.",
durationMinutes: 120,
description: "Transient upstream server failures should prefer another account for at least two hours.",
},
{
statusCode: 502,
keywords: ["capacity", "overloaded", "temporarily unavailable", "temporary", "upstream", "bad gateway", "upstream request failed", "websocket dial", "handshake response"],
durationMinutes: 5,
description: "Gateway upstream failures should prefer another account for a short period.",
durationMinutes: 120,
description: "Gateway upstream failures should prefer another account for at least two hours.",
},
{
statusCode: 503,
keywords: ["capacity", "overloaded", "temporarily unavailable", "temporary", "upstream"],
durationMinutes: 5,
description: "Service unavailable responses should prefer another account for a short period.",
durationMinutes: 120,
description: "Service unavailable responses should prefer another account for at least two hours.",
},
{
statusCode: 529,
keywords: ["capacity", "overloaded", "temporarily unavailable", "temporary"],
durationMinutes: 10,
description: "Provider overloaded responses should cool down this account and use another account.",
durationMinutes: 120,
description: "Provider overloaded responses should cool down this account for at least two hours and use another account.",
},
],
};