type
Metric
title
Agent turn latency
description
Measured wall-clock for chat turns, before and after output-bounding, with what did not help.
tags
metrics, latency, performance
status
stable
stale_after
Sat Jan 30 2027 01:00:00 GMT+0100 (Central European Standard Time)
generated
crm-bot/deepseek-v4.1-flash · Fri Oct 30 2026 10:53:57 GMT+0100 (Central European Standard Time)
verified
process:live-probe · Fri Oct 30 2026 10:53:57 GMT+0100 (Central European Standard Time)

Method

Repeated identical prompts against the live stack, median of N, on the box. A turn is a POST /ui/chat followed by a poll loop until the run stops polling, so the numbers include the model, the tool calls and the persistence — not just the HTTP hop.

Result

Turn Before After prompt/output work
simple recall 2.4–3.4 s (swings to 11 s for the same prompt) ~5.9 s — provider variance dominates, no gain claimed
chart spec 18.4 s 8.8 s
HTML dashboard 86.5 s, 8,877-char artifact 35–61 s, median ~48 s, ~2,200-char artifact
POST /ui/chat itself, after async runs — 0.02 s (was the whole turn)

What the numbers rule out

What did not work

max_tokens is ignored by the API server: 40 and 400 both produced 1,068 completion tokens with finish_reason: stop. The knob was removed from the code rather than left as decoration. Output is bounded by instructing the model (artifact caps, no comments, prefer a chart spec over raw HTML), and by making the wait legible — see the streaming states in the run bubble.

Rendered from nx-master/metrics/agent-latency.md · OKF bundle · regenerate with npm run render