ResponseMetrics
A response's numbers on one line: time to first token, total time, tokens in and out, reasoning, cost. Empty before a response; quiet placeholders hold their place while one streams.
- First token
- 420 ms
- Total
- 3.14 s
- Tokens
- 1,204 → 856
- Reasoning
- 312
- Cost
- $0.00973
<ResponseMetrics timeToFirstToken={420} duration={3140} inputTokens={1204} outputTokens={856} reasoningTokens={312} cost="0.009725" />import { ResponseMetrics, formatLatency } from "@logicplanes/kaeso-ui/playground";Props
coststring | nullUSD as a decimal string: "0.004213".
durationnumber | nullMilliseconds from sending to the last token.
inputTokensnumber | nullThe tokens sent, once known.
liveboolean = falseA response is arriving: values not known yet show a quiet "—" in the room they will take.
outputTokensnumber | nullThe tokens received, once known.
reasoningbooleanThe model reasons: while
live, the reasoning item waits with a placeholder.reasoningTokensnumber | nullOf the output tokens, those spent reasoning. Shown when given, or when
reasoningis set.size"md" | "sm" = smThe text size.
startedAtnumberWhen the request was sent (Date.now()): while live, Total counts up quietly until
durationarrives.timeToFirstTokennumber | nullMilliseconds from sending to the first token.