fix: giảm spam 429 từ Claude OAuth usage endpoint
- claudeAutoPing: cache resetAt in-mem, bỏ qua poll usage cho tới gần reset - ProviderLimits: throttle auto-refresh Claude 3 phút, nút bấm tay vẫn refresh ngay - claude.js: 429 ở OAuth usage → cooldown 3 phút, fallback legacy (không ảnh hưởng chat) Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,6 +3,8 @@ import { getModelsByProviderId } from "open-sse/config/providerModels.js";
|
||||
// ─── Constants ───────────────────────────────────────────────────────────────
|
||||
export const QUOTA_CACHE_KEY = "quotaCacheData";
|
||||
export const REFRESH_INTERVAL_MS = 60000;
|
||||
// Claude usage/quota endpoint rate-limits; poll it less often than other providers
|
||||
export const CLAUDE_REFRESH_INTERVAL_MS = 180000;
|
||||
export const DEPLETED_QUOTA_THRESHOLD = 5;
|
||||
export const AUTO_REFRESH_STORAGE_KEY = "quotaAutoRefresh";
|
||||
export const CONNECTIONS_PAGE_SIZE = 20;
|
||||
|
||||
Reference in New Issue
Block a user