-
Notifications
You must be signed in to change notification settings - Fork 739
feat: include ttft and total request time in nvext (engine-agnostic) #4880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: PeaBrane <[email protected]>
WalkthroughA per-request timing tracker module is introduced to capture request lifecycle metrics (received time, first token, finish), then integrated into OpenAI chat completions and completions protocol handlers, with corresponding test validation for timing data accuracy. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: Keiven C <[email protected]> Signed-off-by: Yan Ru Pei <[email protected]>
…i-dynamo#4880) Signed-off-by: PeaBrane <[email protected]> Signed-off-by: Yan Ru Pei <[email protected]> Co-authored-by: Keiven C <[email protected]>
Per-request timing metrics via nvext
Changes
RequestTimingTrackerinlib/llm/src/protocols/common/timing.rsOnceLockfor set-once semantics (handles disaggregated serving correctly)ttft_ms,total_time_ms,request_received_msDeltaGenerator(chat_completions + completions delta.rs)extra_fields: ["timing"]nvext.timingResponseMetricCollector)_test_router_decisions_disaggtestWhy not reuse
ResponseMetricCollector?ResponseMetricCollectorlives at the HTTP boundary and won't have access to pipelineContext. Future work requiresContextto propagate KV router data (cached tokens, etc.) through the pipeline and into nvext.For future
Contextregistry to propagate KV router-specific data (e.g.,num_cached_tokens) and inject into nvextworker_idcomes fromdisaggregated_params,timingset directly — unify this)Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.