9router/open-sse/services/usage
B1nh M1nh f260a1817b feat: Ollama Cloud quota tracker + proactive background OAuth refresh
Ollama: replace informational stub with real quota tracker hitting ollama.com/api/usage (session 5h + weekly 7d, 0..1 ratio) and /api/me plan label; bind handler to apiKey + add features.usageApikey so apikey connections work.

Token refresh: add backgroundTokenRefresh scheduler that refreshes OAuth connections within max(provider lead, 30min) of expiry, independent of inbound traffic (10s after boot, then every 5min, unref'd timers, DISABLE_BACKGROUND_TOKEN_REFRESH kill-switch, fail-open per tick/connection). Registered from custom-server.js (listening) and initializeApp.js. checkAndRefreshToken gains opt-in {force} for the scheduler; request path unchanged.
2026-08-02 09:34:27 +07:00
..
claude.js fix: giảm spam 429 từ Claude OAuth usage endpoint 2026-06-17 11:42:20 +07:00
codebuddy-cn.js fix(codebuddy-cn): show bonus packs as one-time, not monthly-replenishing 2026-06-29 15:22:47 +07:00
codex.js feat(codex): show reset credit expiry details (#2290) 2026-07-03 15:07:45 +07:00
deepseek.js feat(usage): add Kimi and DeepSeek usage handlers 2026-07-29 18:09:35 +07:00
github.js refactor(app): DRY pass — split large files, extract shared utils 2026-06-14 19:31:09 +07:00
google.js fix(antigravity): align provider fingerprint with IDE Desktop 2.1.1 (#2389) 2026-07-08 10:17:47 +07:00
grok-cli.js chore: drop source-attribution comments from provider code 2026-07-29 21:05:23 +07:00
grokCliQuotaFrame.js feat(usage): fetch SuperGrok weekly pool via gRPC-web 2026-07-29 18:09:43 +07:00
kimi.js chore: drop source-attribution comments from provider code 2026-07-29 21:05:23 +07:00
kiro.js feat(kiro): add external_idp CLIProxyAPI import for Microsoft SSO 2026-06-26 11:42:05 +07:00
minimax.js refactor(app): DRY pass — split large files, extract shared utils 2026-06-14 19:31:09 +07:00
misc.js feat: Ollama Cloud quota tracker + proactive background OAuth refresh 2026-08-02 09:34:27 +07:00
shared.js refactor(app): DRY pass — split large files, extract shared utils 2026-06-14 19:31:09 +07:00