8.4. Router Statistics — Coverage¶
The Statistics → Router tab reads from the bundled Continuum Router's /admin/stats endpoint and shows total requests, token totals, per-model usage, per-backend health, and latency percentiles. Some traffic shapes are not yet reflected in those counters even though the router is healthy and forwarding requests correctly.
This page summarizes what is counted, what is not, and how to monitor a TCP-exposed router until full coverage ships.
What is counted¶
The router's request counters increment for traffic that arrives in OpenAI-compatible shape:
POST /v1/chat/completionsPOST /v1/completionsPOST /v1/embeddingsPOST /v1/responsesPOST /v1/images/generations,/v1/images/edits,/v1/images/variationsPOST /v1/rerankPOST /embed_sparse
These paths flow through the router's main proxy handlers, which invoke the stats middleware on every request — including the listener your remote clients are connecting through. External-TCP-exposed traffic on these paths is counted the same as loopback traffic.
What is not counted yet¶
The router's request counters do not currently increment for traffic that arrives in Anthropic Messages API shape:
POST /anthropic/v1/messagesPOST /anthropic/v1/messages/count_tokens
The router still routes these requests correctly and your client receives the expected response — it is purely the /admin/stats accounting layer that is bypassed on the Anthropic path. The shared StatsCollector is never notified.
This is the most common reason the Statistics → Router tab shows uptime > 0 but total_requests == 0: Claude Code and other Anthropic-shaped clients talk /v1/messages, so a router that is serving only that shape will appear idle in the stats UI even after days of real traffic.
How to confirm what's happening¶
You can verify locally with a single curl against each shape and a stats poll between them:
# OpenAI shape — counter goes up
curl -s http://127.0.0.1:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"<your-model>","messages":[{"role":"user","content":"hi"}]}'
curl -s http://127.0.0.1:8000/admin/stats | jq '.overall.total_requests'
# Anthropic shape — counter stays the same
curl -s http://127.0.0.1:8000/anthropic/v1/messages \
-H 'Content-Type: application/json' \
-H 'x-api-key: <your-key>' \
-H 'anthropic-version: 2023-06-01' \
-d '{"model":"<your-model>","max_tokens":16,"messages":[{"role":"user","content":"hi"}]}'
curl -s http://127.0.0.1:8000/admin/stats | jq '.overall.total_requests'
If only the OpenAI poll changes the counter, you are seeing the coverage gap described here.
Interim monitoring¶
Until the router's /admin/stats counts every shape, the recommended way to monitor a TCP-exposed router is:
- Application logs. Backend.AI GO surfaces all router traffic in Settings → Logs. Filter to the router source to see every accepted request, regardless of API shape.
- Backend telemetry. Cloud providers (Anthropic, OpenAI, Bedrock, etc.) usage dashboards see every request your router forwards. For self-hosted backends (llama.cpp, vLLM), the backend's own metrics endpoint sees them too.
- The Statistics → In-App tab. All chat completions issued from inside Backend.AI GO itself are counted in the In-App view independently of the router stats endpoint.
Tracking the underlying fix¶
The gap lives in the upstream Continuum Router, not in Backend.AI GO's plumbing. Progress is tracked at:
- Backend.AI GO: lablup/backend.ai-go#2990 — overall issue and UI hint
- Continuum Router: lablup/continuum-router#627 — the per-format accounting fix in the router itself
Once a Continuum Router release with the fix lands, Backend.AI GO will bump the version pinned in scripts/download-continuum-router.sh. From the next install onward, all Anthropic traffic will show up in the Statistics → Router tab automatically — no migration step needed.
The hint shown in the Statistics → Router empty state will disappear automatically once non-zero counts are recorded.