feat: reorder first/latency in seconds, add effort column

- logs columns are now Key | Account | Model | Effort | Type | Tokens |
  Cost | First | Latency | Tok/s | Time
- First and Latency render in seconds (5.3s) instead of milliseconds
- Effort shows the request reasoning_effort (- when absent) and is
  filterable; the detail line appends it to the model as model (effort)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-21 11:45:19 +08:00
parent 2d3d433f4f
commit fd4e3256d4
5 changed files with 53 additions and 20 deletions
+5 -3
View File
@@ -83,7 +83,7 @@ Sub2API admin usage API and refreshes every 60 seconds by default
(`--logs-refresh-seconds` / `SHUSUB2_LOGS_REFRESH_SECONDS`). Columns:
```text
Key | Account | Model | Type | Tokens | Cost | Latency | First | Tok/s | Time
Key | Account | Model | Effort | Type | Tokens | Cost | First | Latency | Tok/s | Time
```
`Type` is the Sub2API `request_type` (`sync` / `stream` / `ws_v2` / `cyber`).
@@ -91,8 +91,10 @@ Key | Account | Model | Type | Tokens | Cost | Latency | First | Tok/s | Time
the table shows the per-bucket breakdown, actual cost, first-token latency,
decode speed, upstream model mapping, user, and request id.
`First` is the first-token latency (`first_token_ms`). `Tok/s` is the decode
throughput computed as `output_tokens / (latency - first_token)`; it shows
`Effort` is the request's `reasoning_effort` (`-` when absent). `First` is the
first-token latency and `Latency` the total duration, both shown in seconds.
`Tok/s` is the decode throughput computed as
`output_tokens / (latency - first_token)`; it shows
`-` when there is no output or no positive decode window. In the TUI each
API key name is rendered in a stable per-key color so rows from the same
key are easy to group visually (`--once --logs` output stays plain text).