piagent_
← ~/map

$ cat ~/map/pi-ttft.md

pi-ttft

Footer HUD that times the first token and names the culprit — network or server — when one clearly dominates.

extensions✓ Sep 19

Facts

repository
github.com/quanxinwang18-a11y/pi-ttft ↗
GitHub Stars
★ 0
Forks
0
license
MIT
npm / mo
—
last push
Sep 18, 2026

install

Run pi install git:github.com/quanxinwang18-a11y/pi-ttft@v1.1.0, or try it in a single session with pi -e git:github.com/quanxinwang18-a11y/pi-ttft. Requires pi 0.85.1 or newer.

## TL;DR

A pi footer HUD for time to first token: it holds a compact TTFT reading while a turn runs, then splits a slow first token into network response time versus server-side prefill and names the culprit only when one clearly dominates.

## Key points

## FAQ

Q Why split a slow first token into resp and prefill?

The two halves point at different culprits: a large resp means the delay sits in the network or the provider's queue, while a large prefill is server-side and usually means the prompt cache missed.

Q Does tuning thresholds require editing the extension?

No. Thresholds live in pi settings under the ttft key — slowMs, slowTps, dominantRatio — and /ttft reload picks up changes without restarting; /ttft always prints the effective values and their sources.

## References

## Related entries

## Guides

Last updated: Sep 19, 2026