#5908·nanobot

feat(webui): show live tokens/sec while streaming a reply

Author: coinwhCreated Sep 24, 2026Updated Sep 28, 2026
Labelswebuipriority: p2

Problem / Motivation

When the AI streams a reply in the WebUI, there is no way to see how fast it is generating. I'd like a live tokens-per-second indicator so I can tell whether the model is working normally or stalling.

Proposed Solution

While a reply is streaming, show a live tokens/sec readout near the message (e.g. under the reply or in the composer area), plus the total token count for that reply once it finishes. The gateway already tracks token usage server-side (llm_usage), so this is mostly a frontend display task.

Alternatives Considered

  • Show only total tokens after completion (less useful for spotting stalls mid-stream).
  • Show a generic "generating…" spinner (already exists, no speed info).

Related Component

Other (WebUI frontend)

Additional Context

Token usage is already recorded in the gateway's usage tracking; the WebUI just needs to surface it during streaming.