Repository navigation
Description
Summary
Two regressions in the Console v2 usage/logs API, plus one retired endpoint that third-party usage dashboards depended on:
GET /console/api/request-logsreturns 503 ServiceUnavailable as soon as the page size goes above ~20–50 (the threshold drifts during the day).GET /console/api/request-logs/exportreturns 503 ServiceUnavailable every time.- The legacy
GET /console/api/usage/rows(which returned one row per request withcostMicroCents+model+serviceApiKeyId) now 404s for every query, which removed the only way to break usage down per API key.
Reproduced from a normal user session (Go subscription, signed-in Console cookies), no VPN, macOS.
Environment
- Client: custom usage dashboard; auth via Console cookies (
auth,__Host-console_session) +x-org-idheader (same as the Console web app). - Region: China Mobile (CN) — but see "healthy endpoints" below, this does not look like a network issue.
- Date: 2026-09-28, 16:33 UTC+8.
Repro A — page size threshold on /usage/request-logs
Same time window for every call (today 00:00 → +24h, UTC+8):
limit |
HTTP | items |
|---|---|---|
| 5 | 200 | 5 |
| 10 | 200 | 10 |
| 20 | 200 | 20 |
| 50 | 503 | 0 |
| 100 | 503 | 0 |
curl 'https://opencode.ai/console/api/request-logs?limit=100&since=<ms>&until=<ms>' \
-H 'Cookie: auth=…; __Host-console_session=…' -H 'x-org-id: <redacted>'
# → HTTP 503 {"_tag":"ServiceUnavailable"}
Note the threshold is not stable: earlier the same day limit=20 also returned 503 while limit=10 worked; at 16:33 limit=20 worked and limit=50 did not. Looks like a server-side cost/timeout guard rather than a hard limit.
Repro B — export endpoint
curl 'https://opencode.ai/console/api/request-logs/export?format=json&since=<ms>&until=<ms>' -H 'Cookie: …' -H 'x-org-id: <redacted>'
# → HTTP 503 {"_tag":"ServiceUnavailable"} (every attempt, incl. a single day)
Repro C — legacy per-key endpoint is gone
curl 'https://opencode.ai/console/api/usage/rows?range=30d&pageSize=100' -H 'Cookie: …' -H 'x-org-id: <redacted>' # → 404
curl 'https://opencode.ai/console/api/usage/rows?range=7d' # → 404
That endpoint used to be the only one carrying serviceApiKeyId per request, i.e. the only way to show cost/tokens per API key. request-logs carries serviceAPIKeyID too, but it is (a) currently unusable beyond ~20 rows per page, and (b) has no data older than ~Sept 19 for this workspace, while usage/cost-by-day has 30+ days.
Healthy endpoints (same minute, same cookies)
usage/summary, usage/cost-by-day (day + bucket=hour), usage/models (incl. since=…), usage/users, service-accounts — all 200 in 0.8–3.6 s. So the problem is isolated to the two logs endpoints.
Questions / asks
- Can
request-logsaccept normal page sizes (100, as used by the Console's own Logs page) again — or is there a documented max? - Can
request-logs/exportbe fixed? It is the only practical way to pull a day/batch without hundreds of small pages. - Is the legacy
/usage/rowscoming back? If not, could the per-key dimension be exposed somewhere cheaper, e.g.usage/models?groupBy=service_api_key, aserviceAPIKeyIDcolumn inusage/cost-by-day, or a scope inv2/usage/export? Right now there is no endpoint that returns per-key totals for a 30-day window.
Related reports (other projects adapting to the Console v2 migration)
- [BUG] Go quota sidebar fails after Console migration Wikijito7/opencode-model-usage#48 — "Go quota sidebar fails after Console migration"
- feat: restore OpenCode Zen Usage Snapshot on v2 martinvidovic/opencode-limits#48 — "restore OpenCode Zen Usage Snapshot on v2"
- [bug]: budgets/org returns null without an org budget → permanent "Could not parse" error for opencode-zen slkiser/opencode-quota#297 — budgets/org shape change
(Account identifiers intentionally redacted; happy to provide workspace/service-account IDs privately if a maintainer needs them.)
Activity
github-actions commentedon Sep 28, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Sep 28, 2026
This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new issue that follows our issue templates.