You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AgentRouter (agentrouter) has a working balance quota fetcher for routing preflight/monitor, but the connection does not appear on Dashboard → Quota / home Provider Quota widget. Operators only see routing work; remaining credits are invisible in the UI.
On release/v3.8.50, USAGE_SUPPORTED_PROVIDERS in src/shared/constants/providers.tsdoes not include"agentrouter" (nor aliases). Same gate: supportsProviderQuota() in src/shared/utils/providerQuotaVisibility.ts.
So even with a healthy connection and console credentials filled, AgentRouter never enters the quota UI list. Same class of gap as open #9740 (Cline Pass).
2. Usage / provider-limits path never dispatches AgentRouter
open-sse/services/usage.ts → USAGE_FETCHER_PROVIDERS / getUsageForProvider() has nocase "agentrouter".
src/lib/usage/providerLimits.ts → PROVIDER_LIMITS_APIKEY_PROVIDERS has noagentrouter entry.
The implemented fetcher only registers with registerQuotaFetcher / registerMonitorFetcher (routing preflight/monitor), not the /api/usage/provider-limits cache the dashboard reads.
Net effect: preflight may know balance for routing, but Dashboard Quota stays empty for AgentRouter.
Expected
Active agentrouter connections appear on Dashboard Quota / home quota widget when quotaVisible !== false.
Balance is shown (raw units and/or USD ≈ quota / 500000) when System Access Token + New-Api-User are set on the connection.
If console credentials are missing: show the connection with an explicit “quota credentials required / not available” state instead of omitting the provider entirely.
Prefer a single source of truth: either add AgentRouter to the usage/provider-limits path or document that preflight-only trackers must also be listed + hydrated for the dashboard.
Proposed fix
Add "agentrouter" to USAGE_SUPPORTED_PROVIDERS.
Wire getUsageForProvider / provider-limits sync to fetchAgentrouterQuota (or share the registered QuotaFetcher used by preflight).
Bug summary
AgentRouter (
agentrouter) has a working balance quota fetcher for routing preflight/monitor, but the connection does not appear on Dashboard → Quota / home Provider Quota widget. Operators only see routing work; remaining credits are invisible in the UI.Environment
3.8.50(next-web/ branchrelease/v3.8.50)agentrouter(API keysk-…+ optional New-API System Access Token /New-Api-User)/dashboard/quotaand homeProviderQuotaWidgetBackground
GET /api/user/selfwithAuthorization: Bearer {System Access Token}+New-Api-User: {userId}→ rawquotaquota / quota_per_unit(default500000)feat(sse): quota tracking for AgentRouter, v0, FreeModel), which added:open-sse/services/agentrouterQuotaFetcher.ts(registered viaquotaTrackersBatch.tsinto quotaPreflight + quotaMonitor)providerSpecificData.consoleApiKey+newApiUserId(AgentrouterConsoleFields.tsx)Root cause (verified on
release/v3.8.50)Two separate surfaces; only the SSE/preflight path was wired.
1. Dashboard filters out
agentrouterProviderQuotaWidget(and the same pattern on the quota page) keeps only:On
release/v3.8.50,USAGE_SUPPORTED_PROVIDERSinsrc/shared/constants/providers.tsdoes not include"agentrouter"(nor aliases). Same gate:supportsProviderQuota()insrc/shared/utils/providerQuotaVisibility.ts.So even with a healthy connection and console credentials filled, AgentRouter never enters the quota UI list. Same class of gap as open #9740 (Cline Pass).
2. Usage / provider-limits path never dispatches AgentRouter
open-sse/services/usage.ts→USAGE_FETCHER_PROVIDERS/getUsageForProvider()has nocase "agentrouter".src/lib/usage/providerLimits.ts→PROVIDER_LIMITS_APIKEY_PROVIDERShas noagentrouterentry.registerQuotaFetcher/registerMonitorFetcher(routing preflight/monitor), not the/api/usage/provider-limitscache the dashboard reads.Net effect: preflight may know balance for routing, but Dashboard Quota stays empty for AgentRouter.
Expected
agentrouterconnections appear on Dashboard Quota / home quota widget whenquotaVisible !== false.quota / 500000) when System Access Token +New-Api-Userare set on the connection.Proposed fix
"agentrouter"toUSAGE_SUPPORTED_PROVIDERS.getUsageForProvider/ provider-limits sync tofetchAgentrouterQuota(or share the registered QuotaFetcher used by preflight).consoleApiKey+newApiUserId(already present from feat(sse): quota tracking for AgentRouter, v0 (Vercel), FreeModel (#6850, #6845, #7075) #7653).supportsProviderQuota("agentrouter") === trueProviderQuotaWidgetcandidate listRelated
USAGE_SUPPORTED_PROVIDERSomission pattern (Cline Pass)qwen-cloud-token-planAcceptance
agentrouterlisted inUSAGE_SUPPORTED_PROVIDERS