Files
OmniRoute/changelog.d/features
Diego Rodrigues de Sa e Souza f8879cd4e6 feat(usage): add TTFT/E2E-latency/tokens-per-second to model latency stats (#6875)
Widen getModelLatencyStats() to also compute avgTtftMs, avgE2ELatencyMs and
avgTokensPerSecond from usage_history's existing ttft_ms/tokens_output
columns (no schema change), and feed them into buildAutoCandidates() so the
existing speed-ranking factor (#6011, speedRanking.ts/routerStrategy.ts)
scores on real telemetry instead of falling back to the pool median.

avgE2ELatencyMs aliases avgLatencyMs: usage_history has no distinct second
latency column beyond latency_ms/ttft_ms.

Extracted the accumulation/reduction logic into pure helpers
(accumulateLatencySample, buildLatencyStatsEntry, resolvePositiveOption) in
usageHistory/helpers.ts to keep getModelLatencyStats() under the complexity
ratchet and usageHistory.ts under its frozen file-size baseline.
2026-07-17 14:57:53 -03:00
..