* feat(quota): add Wafer.ai quota provider - New provider: wafer.js fetches from https://pass.wafer.ai/v1/inference/quota - Auth: reads wafer/wafer-ai/wafer_ai keys from auth file - Timeout: AbortSignal.timeout(15_000) with timeoutSignal.aborted detection - Response: parses remaining/limit/overage/usedPercent/window_end/plan_tier - valueLabel: planTier + remaining/limit + overage suffix - Window: 5h (18000s) via resolveWindowLabel - Cross-runtime: added to web registry, UI types, VS Code dispatcher * fix(quota): wafer provider fixes — auth alias, decompression, logo - Add 'wafer.ai' auth alias to match actual auth key format - Use 'Accept-Encoding: identity' header to fix Bun fetch decompression issue with Cloudflare-backed responses - Match copilot valueLabel format: 'planTier · X / Y left' - Add wafer logo alias so Providers and Usage pages resolve to the same wafer.ai logo from models.dev * style(quota): fix indentation of timeoutSignal declaration * fix(quota): derive window duration from API instead of hardcoding Compute windowSeconds from window_end - window_start timestamps, with WAFER_WINDOW_SECONDS (5h) as fallback if timestamps are missing. --------- Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
27 lines
543 B
JavaScript
27 lines
543 B
JavaScript
/**
|
|
* Quota module
|
|
*
|
|
* Provides quota usage tracking for various AI provider services.
|
|
* @module quota
|
|
*/
|
|
|
|
export {
|
|
listConfiguredQuotaProviders,
|
|
fetchQuotaForProvider,
|
|
fetchClaudeQuota,
|
|
fetchOpenaiQuota,
|
|
fetchGoogleQuota,
|
|
fetchCodexQuota,
|
|
fetchCopilotQuota,
|
|
fetchCopilotAddonQuota,
|
|
fetchKimiQuota,
|
|
fetchOpenRouterQuota,
|
|
fetchZaiQuota,
|
|
fetchNanoGptQuota,
|
|
fetchMinimaxCodingPlanQuota,
|
|
fetchMinimaxCnCodingPlanQuota,
|
|
fetchOllamaCloudQuota,
|
|
fetchZhipuaiQuota,
|
|
fetchWaferQuota
|
|
} from './providers/index.js';
|