Description
What happened
Usage → Limits shows 127.0.0.1:8317: No accounts reported for a CLIProxyAPI hub whose credentials come from a provider plugin (opencode-go-cliproxyapi, 2x OpenCode Go API keys pooled with round-robin). The hub itself is healthy: GET v0/management/auth-files lists both accounts (provider: "opencode-go", with label, quota_provider, per-window request stats), and the CPAMC Quota page shows live rolling/weekly/monthly windows for both.
The OpenCode Go native limits (via auth.json) work fine — only the hub path is blind.
Diagnosis
In apps/server/src/usage/cliproxyApi.ts, readAccounts filters hub accounts to:
account.provider === "codex" || account.provider === "claude"Plugin-registered credentials (e.g. provider: "opencode-go") are dropped, so the hub always reports zero accounts. The follow-up readAccount only knows how to probe Codex (chatgpt.com/backend-api/wham/usage) and Claude (api.anthropic.com/api/oauth/usage) via the hub api-call endpoint — there is no path for plugin providers even though CLIProxyAPI exposes their quota natively via GET v0/management/quota/providers + POST v0/management/quota/fetch ({ auth_index } → normalized subscription.plan, groups[].buckets[] with window, remainingFraction, resetTime).
Proposed fix
Teach the cliproxy hub to include plugin accounts:
- In
readAccounts, also accept hub accounts whose provider is served by a quota provider (discover viaquota/providers, match onprovider/supports_reset), not just codex/claude. - In
readAccount, for those accounts read limits fromquota/fetch(rolling/weekly/monthly buckets → session/weekly/monthly windows) instead of the codex/claude OAuth usage endpoints.
I will follow up with a PR implementing this against apps/server/src/usage/cliproxyApi.ts + tests.
Environment
- T3 Code nightly 0.1.3 (2026-10-24), local + remote Linux environments
- CLIProxyAPI v8.0.41 + opencode-go-cliproxyapi v0.2.2, 2 credentials pooled
Activity