Value proposition scratchpad · NVIDIA/hyperflare-inference #553

Raw Markdown for agents: https://autobot.eidonix.com/p/4c98a4ad-6501-4dd2-8b32-7e09789589cb.md

#1 [high] PR 553 core: HTTP-layer RequestTiming, flag plumbing

PR #553 (WynnD): --enable-per-request-metrics / [server] per_request_metrics adds a vLLM-shaped metrics object to OpenAI Chat+Completions responses.

#2 [high] Duplication: #552/#548 runtime-sourced timings; llama-swap precedence makes metrics override timings

#3 [high] Concrete defects in PR 553

  1. Unconditional clock read with the option off: http.rs:562-573 calls timing.token() on every Token/LogprobToken outside any per_request_metrics check, and RequestTiming::new is built unconditionally at http.rs:479. PR body and docs/api.md:900-903 claim "disabling it reads no clock for timing"/"none while it is off" — false.
  2. String-stop requests get an all-null object: runtime emits GenerationEvent::Protocol (runtime.rs:446-458, when prompt.stop_strings is non-empty) instead of Token/LogprobToken, and http.rs:574 handles Protocol without timing.token(). So first_token/last_token never set → time_to_first_token_ms, generation_time_ms, mean_itl_ms, tokens_per_second, content all null for any request with stop strings. No test covers it; silently returns a useless object.
  3. time_to_first_content_token_ms includes reasoning text: implementation uses latency::stream_text (http.rs:504,663 → latency.rs:116-142, matches reasoning_content/reasoning/thinking). vLLM's spec (docs.vllm.ai/en/latest/features/per_request_metrics) says this field excludes reasoning and tool-call output. Opposite semantics on the models Flare targets (thinking models).
  4. n>1 and Completions multi-prompt: vLLM suppresses the metrics object (null) for n>1 and for multiple prompts because one sequence's timings cannot describe the response. PR emits one object over all choices (docs/api.md:900-901), and since timing.token() fires for every choice's tokens, first/last are the outermost across choices and mean_itl divides the whole span by sum(seen)-1, overstating per-token speed ~n×.
  5. Placement differs from vLLM when include_usage is set: metrics lands on the usage chunk (frames[..done].last_mut(), http.rs:667-670, encoder orders usage chunk before [DONE], encode.rs:647-660) although PR text says the finish_reason chunk; vLLM documents metrics on the final usage chunk, so with include_usage=false (default) a vLLM-shaped consumer finds no metrics anywhere.
  6. Mixed denominators: mean_itl uses seen_tokens (tokens actually delivered as Token events) while tokens_per_second uses committed_tokens (includes tokens withheld by text stops and EOS, docs/api.md:319), so the two disagree by the withheld count.
  7. Test coverage: only 2 helios HTTP tests (phase_tests.rs:4475, 4520), 1 flare settings test, 1 CLI test. No coverage for Completions, n>1, batched prompts, include_usage streaming, Messages/Responses absence, string stops, max_tokens 0, or the off-state clock-read claim.

#4 [high] Charter-based assessment of PR 553