relay

Reviewed at commit 867b81f

KOZMOS Relay: the API latency lab in a sidebar. Every model request of the main loop and its subagents with latency, time to first token, model, effort…

Made by
KOZMOS
What we checked

Times every model request of the main loop and its subagents and shows latency, time to first token, tokens per second, token counts, cache share and stop reason in a sidebar that /relay toggles. It reads only request timing and usage figures, not prompts or file contents, makes no network calls and runs no programs. Nothing is written to disk.

Review details

Static review of the source at the pinned commit; not run. Registers session.start (registers /relay, optional autoOpen user setting), command.run for /relay and /relay stats, agent.spawn (remembers the subagent description), a turn.step generator hook that passes every stream chunk through unchanged and only records timestamps, usage and stop reason, and ui.render for the Pane. Runtime calls: $.clock.now, $.agent.list, $.ui.open/close/panes/resolve, $.command.register and the $.state atom API; the last 300 requests are kept in memory and plugin state. No $.http, $.process, $.fs or $.store calls and no model calls. Recording errors are swallowed so the request path is never blocked. Not reviewed: the host engine; hooks/lib/probe.ts is not imported by any module.

What it uses
  • Reads your prompts: no
  • Sees tool calls: no
  • Blocks or changes tool calls: no
  • Reads or writes files: no
  • Runs programs on your machine: no
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: no
  • Shows something on screen: yes
Hooked events

KOZMOS Relay: the API latency lab in a sidebar. Every model request of the main loop and its subagents with latency, time to first token, model, effort, input/output/cache tokens, tokens per second and stop reason; a latency histogram, tokens/sec over time, model mix, p50/p95, the slowest five and cache-read share per request. /relay toggles it.

Made this mod? Add a badge to your README

modsforClaude badge for relay

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/relay.svg)](https://modsforclaude.com/mods/relay/)

← All mods