Skip to content

Show estimated decode tok/s alongside end-to-end throughput in Logs #4038

Description

@cb8010d6

This was generated by AI during triage.

Area

Dashboard

What are you trying to accomplish?

Compare routed model generation throughput without conflating first-token latency with post-first-output delivery speed. The Logs page already records TTFT and output token counts, so users should be able to inspect an estimated decode-rate metric alongside the existing end-to-end tok/s value.

What prevents this today?

The current tok/s metric is intentionally calculated as outputTokens / full request duration. A request with a large TTFT therefore appears slow even when tokens arrive quickly after the first output. TTFT is shown separately in the detail dialog, but the dashboard does not derive or display the post-TTFT rate.

What should OpenCodex do?

Keep the existing end-to-end tok/s metric and its filter semantics unchanged. Add an explicitly estimated decode-rate value calculated as:

outputTokens / (durationMs - firstOutputMs)

Use the request-relative TTFT for the top-level row and each attempt's own attempt-relative TTFT for combo rows. Return the metric as unavailable when usage, positive output tokens, TTFT, or a positive post-TTFT duration is unavailable. Label the value as estimated because completion framing, network pauses, and stream finalization can still be included after the first output.

Example usage or interface

For a log entry with 240 output tokens, 10,000 ms total duration, and 2,000 ms TTFT:

  • Existing end-to-end rate: 24 tok/s
  • Estimated decode rate: 30 tok/s

The Logs table and request detail should show both values without changing existing speed filters.

Alternatives or workarounds

Users can manually export the log fields and compute the value, but this is slow and error-prone, especially for combo attempts whose TTFT is relative to the attempt rather than the parent request.

Additional context

This is a display-time derived metric only. It should not mutate persisted request logs or usage history.

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Proposed acceptance criteria

  • Keep the current end-to-end tok/s value and speed-filter behavior unchanged.
  • Add displayMetrics.decodeTokPerSecond only at management-API response time; do not change RequestLogEntry, usage.jsonl, or persisted schemas.
  • Use the parent request's firstOutputMs for the parent metric and each combo attempt's own firstOutputMs for the attempt metric.
  • Return ttft_missing when TTFT was not recorded, and invalid_duration when the post-TTFT interval is non-positive or invalid.
  • Mark every decode-rate value as estimated, including when token usage itself was reported exactly.
  • Stack end-to-end and decode values in the existing Logs rate column to avoid widening the fixed-layout table; show separate labeled values in request details and combo attempt details.
  • Keep this metric Logs-only; routing analytics remain unchanged.
  • Cover parent/attempt separation, unavailable cases, persistence immutability, locale parity, and unchanged speed-filter semantics with tests.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestguiDashboard, tray, settings UI

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions