Skip to content

[Doc][Router] Clarify RequestStatsMonitor TTFT timing - #1053

Open
dsxyy wants to merge 2 commits into
vllm-project:mainfrom
dsxyy:codex/c-003-ttft-docs
Open

[Doc][Router] Clarify RequestStatsMonitor TTFT timing#1053
dsxyy wants to merge 2 commits into
vllm-project:mainfrom
dsxyy:codex/c-003-ttft-docs

Conversation

@dsxyy

@dsxyy dsxyy commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • clarify that RequestStatsMonitor records TTFT when the first response token is received
  • correct the get_request_stats() description of when TTFT is unavailable
  • leave request statistics behavior unchanged

Testing

  • git diff --check
  • black --check src/vllm_router/stats/request_stats.py
  • isort --check-only src/vllm_router/stats/request_stats.py
  • codespell --ignore-words .codespell-ignore src/vllm_router/stats/request_stats.py
  • not run (documentation-only change)

Signed-off-by: 姚远 <asmile.yy@gmail.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the docstrings and comments in request_stats.py to clarify that TTFT (Time To First Token) is calculated when the first response token is received. Feedback suggests adding a guard check in on_request_response to prevent duplicate calls for the same request from corrupting the statistics.

Comment thread src/vllm_router/stats/request_stats.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3fad59c6e1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/vllm_router/stats/request_stats.py Outdated
Signed-off-by: 姚远 <asmile.yy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant