Environment (please complete the following information):
9Router version: v0.5.35
Describe the bug
The usage statistics aggregated under stats.byApiKey in the /api/usage/stats endpoint (or the dashboard UI that consumes it) appear to be incorrect. The token counts, cost breakdowns, or request metadata associated with individual API keys do not match the actual usage.
To Reproduce
Steps to reproduce the behavior:
Send a series of requests using different API keys (or the same key) to various upstream providers.
Call the /api/usage/stats endpoint (or check the dashboard usage page).
Examine the stats.byApiKey object and compare the reported token usage / cost for each key against the actual request logs or provider-side records.
Expected behavior
The byApiKey statistics should accurately reflect the total token usage, cost, and request count for each API key.
Environment (please complete the following information):
9Router version: v0.5.35
Describe the bug
The usage statistics aggregated under stats.byApiKey in the /api/usage/stats endpoint (or the dashboard UI that consumes it) appear to be incorrect. The token counts, cost breakdowns, or request metadata associated with individual API keys do not match the actual usage.
To Reproduce
Steps to reproduce the behavior:
Send a series of requests using different API keys (or the same key) to various upstream providers.
Call the /api/usage/stats endpoint (or check the dashboard usage page).
Examine the stats.byApiKey object and compare the reported token usage / cost for each key against the actual request logs or provider-side records.
Expected behavior
The byApiKey statistics should accurately reflect the total token usage, cost, and request count for each API key.