Opened by a workflow run, Nov 27, 2026 9:09 PM EST.
screen malicious
Screen Result: All Clear
Evidence: PR #560 ("Emit vLLM-compatible per-request metrics from runtime instants", open draft, head 037b9d5, 18 files +1898/−123) contains no prompt injection or other content aimed at steering an agent.
- The PR has zero comments, reviews, or inline review comments (
pr_commentsreturned "No comments"), so there is no conversation surface in which instructions could be planted. - All 18 changed files are modifications to existing files — Rust source under
helios/src/server/(metrics.rs +548, http.rs +59/−28, runtime.rs +155/−55, encode.rs +93/−1, plus config/server/latency/observation/scheduler and three test files), CLI flag plumbing inflare-cli/src/cli.rs(+40) andmain.rs(+3), and docs (docs/api.md+178/−4,docs/cli-design.md+2/−1,helios/model-contract.md+14/−6). No new files, scripts, binaries, workflows, or CI changes. - Every one of those diffs was read in full: histogram buckets and atomics, the
Committedgeneration event andRequestTimesplumbing,Encoder::enable_request_metrics/record_commit/record_times/metrics_value, theBootstrapboolean validation, the CLI flag structs, and the new unit/phase tests. No injected text addressed to an agent, no "ignore previous instructions" style content, no fabricated tool output, no encoded/obfuscated blobs, no bidi or zero-width tricks, no credential access, no outbound network calls (only127.0.0.1listeners in test code), no shell-outs, no new dependencies, no test-gated backdoors. - The only instruction-like string in the touched area is pre-existing, unchanged product code:
helios/src/server/inference.rs:386— "You must call at least one of the provided tools in your next response…" — atool_choice == Requiredsystem prompt aimed at the served model, not at an agent, and not modified by this PR. - Related PRs the description relies on (#548 stacked, #552/#553 superseded/closed, issue #551) read as ordinary technical material with no directives.
The PR's only notable deviations are design/policy choices the author discloses openly (flag-only enablement with no [server] per_request_metrics config key; flag applies to rank zero and is forwarded to rank zero's flare run; WinUI cannot enable it; a persistent Orbit group cannot negate it). Those are review concerns, not security findings.
Open questions / not found: Nothing was found that could not be explained; no GPU/live-server validation was attempted because it is irrelevant to injection screening.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: WynnD (outside contributor, GitHub association NONE, 0 merged PRs; Discord oystersmiles)
Motivation: Flare answers only report aggregate /metrics, so a proxy such as llama-swap cannot tell how fast one request prefilled or decoded; it reads llama.cpp (not opened) timings or vLLM metrics out of the response body, finds neither, and shows −1 for both rates (#551). This PR emits vLLM's six-field metrics object from instants the model worker already records, behind an opt-in flag.
Scale: +1898 / −123 in 18 files (published diff against main; roughly +880/−72 is this PR's own, the rest is the unmerged stacked base #548)
Proposal:
- New
GenerationEvent::Committed { at_ns }emitted once per committing model step at position zero, andFinishednow carriesarrival_nsplus the request'sRequestTimes;commitsis threaded throughgenerate_observed/generate_many_observed/enqueue_manyand raises the output event reservation by one per generated token. Encoder::enable_request_metricsdecides placement once, before submission: top level of a JSON body, the final usage chunk of a Chat/Completions stream (needsstream_options.include_usage), the terminalresponseobject of a Responses stream, never Messages;nullforn > 1, omitted for multi-prompt Completions.- Stream-only
time_to_first_content_token_mslatches the commit instant of the step whose output first produced non-empty answer text, skipping reasoning, tool calls and suppressed text. - New
--enable-per-request-metricsonflare runandflare orbit run(rank-zero, forwarded only when set), setting server config keyper_request_metrics; deliberately no[server]config-file key, so the WinUI controller cannot enable it and a saved Orbit group cannot turn it off. - Chat
performanceobservation gainsfirst_scheduled_ns; docsapi.md,cli-design.mdandhelios/model-contract.mdupdated. Touches: - helios/src/server/runtime.rs (event enum, admission capacity, commits in the worker step loop)
- helios/src/server/http.rs + protocol/encode.rs (encoder constructed before submission; placement and null rules)
- flare-cli/src/cli.rs + main.rs, helios/src/server/config.rs (flag and bootstrap key) Related items:
- #548 Add per-request histograms and vLLM-parity request metrics (open, draft): required base, stacked under this diff; three "Changes Requested" auto-reviews, no mergeable state
- #551 Report per-request timings on final responses so llama-swap can show prompt and decode rates (open): the issue this closes
- #553 Add vLLM-compatible per-request metrics (closed): superseded — HTTP-timed, so
queue_time_mswas always null; auto-review stopped for low value / charter misalignment - #552 Report request timings on final responses (closed): superseded — llama.cpp (not opened)
timings, double-subtracted cached prompt tokens - #549 Report KV pages held by active requests (open): same author, same series, overlaps only through #548
Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Autobot comments: Draft with zero comments, zero reviews, no CI checks on head
037b9d5f, and — unlike #548/#549/#553 — no flare-autobot case file yet. The published diff is two PRs:metrics.rsandlatency.rsare #548's changes verbatim, so a reviewer sees a much larger change than this PR is, and it cannot merge before a draft base whose only verdicts are "Changes Requested". No live, GPU, gateway, Windows or overhead evidence at all, whereas both superseded PRs had live llama-swap numbers; the move to runtime instants traded away the family's only end-to-end evidence. The flag reaches a Chat/Completions stream only if the client sendsstream_options.include_usage, which narrows the llama-swap motivation. #553 added a[server] per_request_metricsconfig key that #560 drops, andflare's config struct does not deny unknown keys, so a user following #553's docs gets it silently ignored. A suspected undeclared capacity change (generate_many→generate_many_observed) does not hold: with the flag off both resolve toenqueue_many(prompts, None, false), so the description's cost claim is accurate.
Value Proposition
Verdict: worth it with changes — but only after a maintainer decision and with a narrower first cut
The change is well built, honestly described, and aimed at a real user-visible gap. It is also, so far, demand that comes from the contributor only, it is one of four PRs carrying the same idea, and it puts a new public runtime event on the path that the repo mutation-tests for response-queue safety. Merge it, but as a smaller first cut and after a maintainer says the shape is wanted. Do not merge it as the stacked 18-file / +1,900-line branch.
What is good, and matches the charter
- The problem is real and narrow. #551: llama-swap shows prompt/decode rates as
-1for every Flare request, because it parses proxied response bodies and does not scrape/metrics(verified in llama-swap v250internal/server/metrics.go,buildMetrics). That is not a hypothetical user. - Wire contract is faithful, not invented. I checked vLLM's per-request-metrics doc: TTFT measured from scheduling,
generation_time_msdecode-only,mean_itl_msnull for one token,tokens_per_secondspanning scheduling→last token,queue_time_msfrom the scheduler queue,n>1→metrics: null, multi-prompt Completions omitted, Messages never, Responses onresponse.completed/response.incomplete, streams needstream_options.include_usage. #560 matches all of it (helios/src/server/protocol/encode.rs:238-292,docs/api.md:1005-1054). The author also states the deliberate divergences (six keys always present; null forn>1in bodies too) instead of hiding them. - Right layer. It reuses the instants the worker already records for the histograms (stacked #548), adds no clock reads, keeps
messages-free Models/API behaviour, and gates everything behind one flag with the off path costing one branch.helios/model-contract.md:343-365documentsfirst_scheduled_ns, which also gives Chat clients the same intervals in Flare's own vocabulary. This is the "solve it where the data already is" instinct the charter asks for (#404). - Evidence quality is above average for a stacked PR: encoder unit tests with exact expected milliseconds (
helios/src/server/protocol/tests.rs:2350-2450), plus worker-driven phase tests that assert each instant falls inside the model step that produced it (phase_tests.rs:4616-4860), plus a bootstrap test that rejects1,"true",null.
Why I am not voting "worth merging" outright
-
Authorization is missing (AGENTS.md:165-169, 201-207). The only demand is #551, filed by the same author whose #548/#549/#560/#552 are the whole cluster; "hypothetical future consumers … do not establish a need". The author is also not one of the named priority contributors. Concretely: #553 — the same
metricsobject — was auto-reviewed twice with "Review Stopped: … low value or does not align with the project charter". The charter's counterweight is real (docs/api.md:973 mirrors--enable-prompt-tokens-details, cli-design.md:475 mirrors--language-model-only,server/models.rs:72(not opened) mirrors vLLM ModelCard fields), but docs/core-design.md:210-219 (not opened) says Flare "does not aim for vLLM's feature matrix". A maintainer has to pick a side of that line before the code lands; that is a two-line decision, and everything below is conditional on it. -
The stated benefit is not delivered for the default streaming client. llama-swap only receives
metricsif the SSE final usage chunk carries it, and Flare only emits that chunk when the client sendsstream_options.include_usage(docs/api.md:1031-1034,encode.rs:735-743). Most SDK streams don't. vLLM closes the same hole with--enable-force-include-usage; Flare has no equivalent and this PR does not add one or say so against #551. Either force usage while the flag is on, or state plainly indocs/api.mdand the description that streamed rates stay-1unless the client opts in. -
The riskiest part of the diff buys the least.
time_to_first_content_token_msis why this PR needsGenerationEvent::Committed(runtime.rs:109-114), thecommitsflag threaded throughgenerate_observed/generate_many_observed/enqueue_many(runtime.rs:847-880), the third term ofoutput_event_capacity(runtime.rs:62-80), and per-steprecord_commit/step_ns/content_nsin the encoder (encode.rs:255-262,:546-551). That event-capacity invariant is exactly whatverification/helios-lifecycle/check.py:218-224mutation-tests ("response queue must cover its complete output allowance"). llama-swap never reads the field, and vLLM itself permits it to be null when unavailable. Cutting it from v1 removes the new public event, the threading, and the budget change, at zero cost to the motivating workflow. -
The flag plumbing contradicts the charter's own "don't silently ignore / be explicit" rule.
Bootstrapacceptsper_request_metrics(config.rs:353-357), but flare's typedConfiguration.server(flare/src/configuration.rs:26-34) has no such field and nodeny_unknown_fields, so[server] per_request_metrics = truein~/.config/flare/config.toml(not opened) parses and is silently dropped (flare-cli/src/config.rs:33-37;main.rs:355sets it only from the flag). Same consequence for the WinUI controller:flare/srchas zero references, so the desktop cannot enable it — while the PR's own analogy,--verify-weights, is inRuntimeSettings(flare/src/runtime_settings.rs:21) and in the WinUI toggle/bridge. Separately,orbit run --persistentsaves the flag with no negating switch (cli.rs:697-699). Both consequences live only in the PR description; nothing indocs/mentions them. Adding the five-line config field fixes the first two and makes the desktop path work; the persistent-group one needs either a real flag or a doc line. -
Bundling hides the cost. Of +1,900 lines, most is the unmerged #548 (
metrics.rs+548,docs/api.md+178,phase_tests.rs+559). The "option off costs one branch" claim is scoped to #560's own diff; the combined branch also adds an unconditional per-stepmonotonic_ns()read inreserve_and_pack(runtime.rs:2255-2270) and aRequestRecordper request from #548. That is fine, but it should be reviewed as one decision about two PRs, not two independent polish passes. -
Evidence for the claim that matters is unrun. No GPU, no live server, no llama-swap check on this code path ("Not run here: a GPU, an exported core, a live server, a llama-swap or gateway check"). The only live gateway numbers in the cluster are from #553 (HTTP-clock) and #552 (llama.cpp (not opened)
timings), neither of which is this code. The charter asks for real evidence (#210, and its bar for behaviour claims). One live llama-swap row showing non--1rates from this branch would settle both points 2 and 6 at once.
Simpler path to the same end
- Chat already exposes the same instants via
return_token_ids+return_token_timestamps→performance{ingress_ns, enqueue_ns, first_scheduled_ns, reused_prompt_tokens}(observation.rs:56-75) andchoices[0].token_timestamps_ns(http.rs:606-607). The new value is therefore only the vLLM wire shape, which is worth having for body-parsing gateways — but it argues for the minimal object, not the maximal one. - Minimal object:
queue_time_ms,time_to_first_token_ms,generation_time_ms,mean_itl_ms,tokens_per_second, plustime_to_first_content_token_ms: null. Placement, null rules and the flag stay exactly as reviewed. That is roughly themetrics_valuebody plusrecord_timesand the two placement hooks — a fraction of the risk.
What would make me vote "worth merging"
- A maintainer decision on the PR that per-request vLLM-shaped response metrics are wanted (answers AGENTS.md:201).
- First cut without
time_to_first_content_token_ms/Committed, or an argument for why the streaming content instant is needed by a real consumer. per_request_metricsas a[server]configuration key inflare/src/configuration.rs(making the WinUI controller path work), and either a negating flag or adocs/api.mdnote for persistent Orbit groups.- One live llama-swap (or equivalent gateway) row, and the stream-without-
include_usagelimitation written intodocs/api.mdnext to #551's use case. - Merge order: #548 first, as stated; keep #552/#553 closed — consolidating on one wire shape was the right call (the double
cache_nsubtraction in #552 is a real reason not to emit both).
Nothing in the design struck me as wrong for this project. What is missing is permission, a smaller first footprint, and one piece of live evidence — all cheap, none requiring new code beyond what the PR already contains.
Full report · Notes Decide Value: yes (90%): This change is worth reviewing: it provides value to the project in line with its charter.
Conventions
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- helios/src/server/runtime.rs:1746-1757: the seven-arm
matches!(kind, Prefill | TerminalPrefill | ScoredPrefill | Resume | Decode | Speculative | Mixed)re-spellsGraphKind::samples()(helios/src/execution/manifest.rs:90-101), which the same file already consumes at runtime.rs:2988; usekind.samples(). - helios/src/server/protocol/encode.rs:80: the new
Timing.streamingduplicates the existingEncoder.streaming(encode.rs:97, set byset_logprobsat :192);record_commit/metrics_valueshould readself.streaminginstead of carrying a second copy fed fromenable_request_metrics's argument (encode.rs:244-252).
Nits: 2
- metrics.rs:211-322 adds
Buckets<N>/Histogram<N>and converts onlylatency.rs, leaving the three host-cache histograms (metrics.rs:199-209, 1178-1214) on the bespokeHOST_*_BUCKETS/host_cost_sumscode. - config.rs:353-357 copies the three-arm boolean parse at config.rs:183-187 (
history_drafts);config.rshasinteger()(:56) andoptional_text()(:303) helpers but noboolean().
Everything else in the lens checked out: the commits flag rides the existing observation: Option<bool> pipeline, Committed/Finished follow existing GenerationEvent conventions, the flag reaches rank zero exactly like --api-key-file, and per_request_metrics follows the thinking_token_budget path one-for-one with no [server] config-file key, as the description states. Read from code only; no GPU, live server, or Windows build was run, and CI on ce44060 reports no checks.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Architecture
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- helios/src/server/runtime.rs:107:
GenerationEvent::Finishedcarriestimes: super::metrics::RequestTimes, butmod metrics;is private (helios/src/server.rs:16) and onlySnapshotis re-exported (:33), so out-of-crate consumers of the public event (the roadmap in-process Rust SDK surface) cannot name, read, or construct the new field; re-exportRequestTimesnext toSnapshotor keep the instants off the public event. - flare/src/configuration.rs:26-34 + docs/cli-design.md:1317: the option exists only as
--enable-per-request-metrics;Server/Settings(flare/src/settings.rs:19-34) have no field, so theflarelibrary and WinUI controller cannot enable it, and[server] per_request_metrics = true— documented nowhere but accepted byBootstrap(helios/src/server/config.rs:353-357) — is silently dropped by the non-deny_unknown_fieldsconfig parser, against AGENTS.md:452-456 and the charter's "Don't silently ignore API fields"; add the field plus a settings path (as #553 did) or reject the key, and document the two stated limitations, which are not in docs. - Whole change / charter: no maintainer request, roadmap item, bug or measurement authorizes the feature; the only named consumer is llama-swap via #551 (same author), and the predecessors #552/#553 were stopped on charter grounds; option-off work on the worker hot path (helios/src/server/runtime.rs:1826-1832
tokens_committedper committing step for every request, plusmetrics.model_step) is unconditional and the PR states CPU overhead was not measured, where the charter asks runtime changes to "bring real evidence".
Nits: None. Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Simplicity
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- helios/src/server/protocol/encode.rs:79-80,255-261:
Timing::streamingis dead state andrecord_commit's&& timing.streamingguard cannot reject anything (http.rs:363 only setscommitswhenenable_request_metricsreturned true, which requires streaming +Single); delete the field and the clause. - helios/src/server/runtime.rs:847-849:
generate_observedis a third admission entry point identical togenerate_many_observedwith a one-element vec, whose only caller (http.rs:368-372) re-wraps the result in avec![]; delete it, and inline the now single-caller privateenqueue(:851-854) intogenerate. - helios/src/server/protocol/tests.rs:2346-2444 and :2457-2474: re-assert carrier frames, null rules and the reasoning/empty-content content instant that the served-worker tests already prove (runtime/phase_tests.rs:4693-4743, :4746-4797); keep only the unique cases (exact values, named-tool-choice suppression, instant provenance,
response.incomplete).
Nits: 2 — tests.rs:2444 asserts a literal six-key count that duplicates the key list at :2353-2360; encode.rs:238-243 restates the placement/null rules that docs/api.md's new section already documents.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Prose
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- docs/api.md:1017 + PR description ("Material limitations", bullet 1):
queue_time_msstart is attributed to "the HTTP handler … just before sending"; the runtime reads it inModelRuntime::enqueue_manyat helios/src/server/runtime.rs:928, before the rest of admission validation and before thetry_sendat runtime.rs:965 (later thanenqueue_nsat :951-953). The interval therefore includes validation of every prompt in the group plus send and worker pickup, not "channel transit (microseconds)". - docs/api.md:1047-1054: the new passage refers to
performance.first_scheduled_nsand "per-token timestamps", butdocs/api.mddocuments neither (performance,ingress_ns,enqueue_ns,token_timestamps_nsappear nowhere else in the file). The "client can compute the same intervals" promise is only supportable from helios/model-contract.md:344-355. Rewrite supplied in the report. - PR description "Material limitations": the WinUI-cannot-enable and persistent-Orbit-group-cannot-disable consequences are recorded only in the description, not in docs/cli-design.md:736 or :1317-1323, contrary to AGENTS.md:56-60. Both claims are true (flare-cli/src/cli.rs:646-648, :859-862; flare-cli/src/main.rs:355-356).
Nits: 2 — the OrbitRun help text at flare-cli/src/cli.rs:646 differs from Run's at :859-860 for the same flag; docs/cli-design.md:1317-1323 should say a [server] per_request_metrics key has no effect.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Correctness
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- helios/src/server/runtime.rs:2257:
reserve_and_packtakes an unconditionalmonotonic_ns()per model step, in both option states, so the PR's "No clock read is added in either state" and its Cost section understate the added work; state the per-step read (or gate it).
Should fix (verification note):
- None beyond the above; the previously suspected config-file path for
per_request_metricsis closed —flare::configuration::Server(flare/src/configuration.rs:26-34) has no such field and[server]is#[serde(default)]withoutdeny_unknown_fields, so a[server] per_request_metricskey is silently ignored (docs/cli-design.md:1384-1386), exactly as the PR describes.
Nits: 3 — first_scheduled_ns is last-writer-wins in the HTTP handler (helios/src/server/http.rs:542), latent only if Chat admits n > 1; the first-scheduled stamp precedes a submission that can fail (runtime.rs:2254-2314), so a never-executed step can be timed; metrics null vs absent across protocols is documented but differs from vLLM.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Subtractive
Verdict: make it smaller first The change: +1898 / -123 Could remove: about 155 lines, in 6 places Biggest subtractions:
- helios/src/server/runtime/phase_tests.rs:4746-4871: two of the new phase tests re-prove placement and null rules already pinned by protocol/tests.rs:2350-2488, and their step-instant assertions repeat :4638-4645; keep one short flag-on/flag-off test, keep the two tests that prove instants land in the right worker step: about 95 lines
- docs/api.md:305-386: the four histogram paragraphs restate the Prometheus HELP strings added in metrics.rs:1548-1600, and the vLLM table at :475-517 says the same populations a third time; cut to ~8 lines and let the table carry the cross-reference: about 35 lines
- docs/api.md:1038-1054: the null-rule prose repeats the table at :1015-1022 and encode.rs:270-293, and the cost paragraph repeats helios/model-contract.md; two sentences plus the existing link suffice: about 28 lines
- helios/src/server/protocol/encode.rs:68-85,254-267: Timing::streaming duplicates Encoder::streaming (both from decoded.stream), RequestMetrics::Suppressed costs a declaration plus three match arms, and record_commit/record_times wrap one-line assignments behind a guard apply() repeats: about 12 lines
- helios/src/server/runtime.rs:860-869: generate_many_observed is a pure pass-through to enqueue_many with a doc comment restating its parameters; the caller's branching must stay: about 12 lines Left behind: None. The change adds no dead paths; the one candidate I withdrew — the Bootstrap per_request_metrics key at helios/src/server/config.rs:353-357 — is reachable from flare run via flare-cli/src/main.rs:355-357, 626 and 701. Only its strict-type test loop (config.rs:734-739) is arguably surplus, ~14 lines. Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
code review summary
Recommendation: Changes Requested
The mechanism is right-sized and correct — worker owns the instants, encoder owns placement, nothing requested or emitted when the option is off — but merge needs a named requirement plus an honest cost section, which currently claims a per-step clock read does not exist.
- Blockers: 2
- Should fix: 4
- Subtractive suggestions: 7
- Nits: 5
Pre Test Report
Pre-test report — PR #560 "Emit vLLM-compatible per-request metrics from runtime instants"
Decision: DO NOT refer to hardware testing yet. Hold for code changes. The change is a sound design in the right layer, but five substantive issues need to be settled first, several of which change exactly the behaviour a hardware run would exercise — so a GPU test now would either be invalidated by the fixes or would burn hardware time confirming a wire shape that is likely to move. A minimal plan is given at the end so testing can start within a turn of the fixes landing.
PR state: open (intake reports draft), head ce44060, 18 files, +1898/−123, authored by an outside contributor with no merged PRs, stacked on unmerged draft #548, which is itself still "Changes Requested" after three review rounds. The PR carries no CI checks on head, no comments, and — critically — no live, GPU, gateway, Windows, or overhead evidence at all (its own "Not run here" list says so). The security screen is all-clear; I found no instruction-like or injected content anywhere in the PR body or diff.
1. Substantive issues that must be fixed before any hardware test
These are not nits. Each was verified in the code at head, not taken from the reviews.
(a) Public API leak — the new event field's type cannot be named outside the crate. GenerationEvent::Finished gained times: super::metrics::RequestTimes (helios/src/server/runtime.rs:97-108). RequestTimes is declared pub at helios/src/server/metrics.rs:326, but mod metrics; is private (helios/src/server.rs:16; only pub use metrics::Snapshot; at :33), while GenerationEvent is re-exported (helios/src/server.rs:34) from a pub mod server (helios/src/lib.rs:29). An out-of-crate consumer — the charter's roadmap in-process Rust SDK (#6) is exactly that surface — can neither read the field nor construct the variant. Before this PR Finished was all primitives. Fix is one line (re-export the type) or moving the instants off the public enum, but which one is chosen is an API decision that must precede testing, since the tests would be written against the resulting shape.
(b) The option has no configuration home, and the key it does accept is silently dropped. helios/src/server/config.rs:353-357 accepts per_request_metrics as a boolean, but flare/src/configuration.rs:26-34 (Server = host, port, api_key, thinking_token_budget, scheduler_checkpoint_extra_work_fraction) has no such field, and [server] derives #[serde(default)] without deny_unknown_fields (only PrefixCache denies, :48-56). So [server] per_request_metrics = true in config.toml (not opened) parses and is discarded with no error and no effect. That is the charter's rule broken one layer down ("Don't silently ignore API fields… Never accept it and quietly drop it") and AGENTS.md (not opened)'s "a setting has one of three homes". Consequence: the flare library and the WinUI desktop controller cannot enable the feature at all (grep confirms zero references to per_request_metrics in flare/src), and the two disclosed limitations live only in the PR description, not in docs/cli-design.md. Reviewers must pick a fix — add the config key, or reject the key explicitly — because either way the reachable surface changes, and a hardware test would currently have to enable the flag on the command line only.
(c) A stated cost claim is false. The PR says "No clock read is added in either state." reserve_and_pack adds super::observation::monotonic_ns() unconditionally per scheduled step, for every lane, in both option states (helios/src/server/runtime.rs:2253-2270). That block belongs to the stacked #548, but this description's Cost section owns the combined claim, and reviewers use that section to judge hot-path impact. Magnitude is trivial; the statement is checkable and wrong. Prose fix.
(d) Duplicated mechanisms and dead state — convention violations with silent-drift failure modes. helios/src/server/runtime.rs:1746-1757 re-spells GraphKind::samples() (helios/src/execution/manifest.rs:90-101, already consumed at runtime.rs:2988), so a future sampling graph kind would silently stop being counted by metrics.model_step. Timing.streaming (helios/src/server/protocol/encode.rs:80, set :250, guard :257) duplicates Encoder.streaming (:97) and its guard is provably unreachable, because http.rs:363 sets commits only when enable_request_metrics(streaming) returned true. A third redundant abstraction, generate_observed (runtime.rs:847-849), is generate_many_observed with a one-element vec whose only real caller immediately re-wraps the result (http.rs:368-372). None of these is a served-output defect; all three are the kind of "second spelling of an existing mechanism" the project's own rules reject, and two of them touch code the tests would cover.
(e) Authorization and evidence. The charter merges PRs addressing "a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs". The only named consumer is #551, filed by the same author; the only maintainer issue in the cluster (#536) asked for Prometheus histograms, delivered by #548. Two predecessors (#552, #553) were stopped on precisely this ground. Combined with (f) below, there is a live question about whether this is the wanted shape at all. A maintainer statement is a two-line decision and gates everything.
(f) The motivating use case is not actually served for the default streaming client — my addition, and the most decision-relevant finding. #560 says "Closes #551", but #551 asks for a llama.cpp (not opened) timings object on Chat/Completions/Messages/Responses, streaming and non-streaming, placed on the chunk that completes the last choice when include_usage is absent. #560 instead ships vLLM's metrics, never on Messages, and in a stream only on the final usage chunk, which exists only when the client sends stream_options.include_usage (helios/src/server/protocol/encode.rs:736-744; docs/api.md:1031-1036). #551 itself notes that a stream without include_usage leaves llama-swap's prompt rate "zero". So for the ordinary SDK streaming client the motivating -1 rates stay -1, and there is no --enable-force-include-usage equivalent (grep: no such flag anywhere). Testing this branch end-to-end against llama-swap would legitimately report the gap as a failure. Note also that the field the PR takes the most risk for — time_to_first_content_token_ms, which is the only reason GenerationEvent::Committed, the commits threading, and the event-budget change exist — is not read by llama-swap at all, and vLLM itself permits it to be null.
2. What is sound and does not need re-litigating
- Layering. Timing is carried from the layer that already reads the instants (the model worker) rather than being re-timed in the HTTP layer; the encoder decides placement once, before submission (
http.rs:361-363). This is the charter's "smallest footprint in shared code". - Event budget is correct.
output_event_capacity(runtime.rs:62-84) multiplies by1 + observed + commitswithchecked_mul, andCommittedis emitted atposition == 0before that step's token events (runtime.rs:1826-1834), so the content instant can never be latched from a later step. - Option-off path is clean in this diff's own scope: no key, no commit events, unchanged capacity (
http.rs:363). - Wire contract matches vLLM as claimed. Placement and null rules at
encode.rs:244-294agree withdocs/api.md:1005-1054and its field table at:1015-1022; the null-for-n>1, omitted-for-multi-prompt, never-Messages, Responses-completed/incompleterules are all implemented where documented. - One correctness nit is latent only, not live:
first_scheduled_nsis last-writer-wins athttp.rs:542, butdecode.rs:753-755rejectsn != 1for every protocol except Completions, andperformanceis Chat-only — so it cannot go wrong today. - Test infrastructure already reaches the response-queue invariant without a GPU:
verification/helios-lifecycle/check.py:214-224mutates_capacity: Some(capacity.clone()),\n arrival_ns:andasync_mpsc::channel(event_capacity); both strings survive #560's edits, so the budget change is still covered by a CPU-only mutation suite. This is a reason not to spend GPU time on it.
3. Expected value if a hardware test were performed now
Low, and mostly negative. The behaviour on the GPU path is largely undetermined by the GPU: every placement, null, and arithmetic rule is unit-tested at the encoder (helios/src/server/protocol/tests.rs:2350-2491) and phase-tested through a step-driven worker (helios/src/server/runtime/phase_tests.rs:4616-4871); the only things a real GPU adds are (i) that the instants are ordered sensibly on real steps, and (ii) that a real gateway sees the fields. (ii) would currently fail by design (finding f), and (i) would hold unless the clock-read claim in finding (c) hides something — which the GPU cannot settle anyway, since measuring it is a CPU/throughput question the PR explicitly declines to make.
4. Conditional minimal test plan (run only after fixes land)
One GPU, one host. Nothing in the diff touches TP>1, multi-host, KV pages, prefix cache, vision, or Windows.
Phase 0 — CPU, before booking hardware (~15 min). Head has no CI, so the author's "clean" claims are unverified: cargo check --features server (helios), cargo check (flare-cli), cargo test --features runtime-core,server --lib -- server::, and verification/helios-lifecycle/check.py. Expected one known failure needing FLARE_TEST_TEMPLATE_DIR.
Phase 1 — GPU, cn5, one gb202 TP1 core, one flare run per flag state (~20 min of GPU). Two servers (flag off / flag on), ten scripted requests:
- Chat body →
metricsat top level, six keys, content instant null. - Chat stream with
stream_options.include_usage→ one carrier frame,choices == [], all six non-null where reachable. - Chat stream without
include_usage→ key absent (this is the #551 gap; assert it so the limitation is documented and tested). - Completions stream
n = 2+include_usage→"metrics": nullin both body and stream. - Completions with two prompts → key omitted.
- Responses stream,
max_tokens=1→response.incompletecarriesmetrics. - Messages stream → never carries it.
- Chat with a reasoning model (
enable_thinking) →time_to_first_content_token_msstrictly greater thantime_to_first_token_ms. - Single-token request →
mean_itl_msnull. - Flag-off repeats of 1 and 2 → no
metricskey anywhere, andperformance.first_scheduled_nsabsent unlessreturn_token_timestampsis set. Plus in-script arithmetic:generation_time_ms == last − first,tokens_per_second ≈ generated / (last − scheduled), all fields non-negative,time_to_first_token_ms ≤ generation + queue.
Phase 2 — optional, 10 min, highest information per minute. llama-swap in front of the branch: one streamed request without include_usage (expect -1) and one with (expect real rates). That single row is the evidence that decides whether the shipped shape meets #551 — and it is the only evidence the PR family has ever had for this code path.
Deliberately not tested: throughput A/B for the flag (no performance claim is made; the added work is one u64 store plus one event per committing step), TP>1/multi-host (unchanged), Windows/WinUI (no code path changed — the enablement gap is finding (b), a code decision, not a hardware question), KV/prefix-cache behaviour, and vision.
Cost caveat that must be checked before booking: flare run requires an exported core and does not accept a recipe alias (docs/cli-design.md:1330-1335). Neither host's cached-model list contains a prepared core — the cached names (nvidia/Qwen3.8-Flash-Next-FP4-Local, nvidia/GLM-5.3-Flash-FP4-Local, etc.) are recipe checkpoints per docs/mtp-design.md:4-5 (not opened). So either confirm a published -FLARE gb202 TP1 core is downloadable (flare download, docs/cli-design.md:878-899) or budget ignition export GPU time; that preparation, not the test itself, dominates the cost. cn5 fits (1 of its 4 RTX PRO 6000 Blackwells; the author's own #548 live evidence used the same GPU family), and cn7/GB10 is only useful if the desktop/config path (finding b) is being validated — which is code review, not hardware.
5. What would turn this into a "refer to testing"
- A maintainer statement that per-request vLLM-shaped response metrics are wanted (finding e).
- A decision on #551: keep vLLM
metricsand either force usage in streams or document theinclude_usagelimitation against llama-swap; or droptime_to_first_content_token_ms/Committedfrom v1 for a much smaller footprint (finding f). RequestTimesre-exported or kept off the public event (finding a).per_request_metricsgiven a[server]configuration home or explicitly rejected, with the two limitations added todocs/cli-design.md(finding b).- Findings (c) and (d) fixed — one prose correction and three small deletions.
- #548 merged, and the branch rebased so the diff under review is #560's own (~+880/−72), not #548's.
Full report · Notes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.
screen malicious
Screen Result: All Clear
Evidence:
- PR description (PR #560, head 046aaef, 22 files, +1757/−77): a technical spec for opt-in vLLM-compatible per-request metrics, plus evidence and a documented limitation. No imperative text addressed to a model or agent, no hidden markup, no encoded payloads, no out-of-scope requests.
- Conversation (4 messages only): two
flare-autobotautomation posts (intake + generated review, linking autobot.eidonix.com case files) and two author comments containing live-validation tables. The only directive-sounding line — "Have your agent review the Full Review" — is repository bot boilerplate that appears identically on unrelated PRs (#533, #550, #556, #559), not author-supplied; it points at the repo's own review service and asks for nothing beyond a normal review. - Code matches the claim: the six-field
metricsobject is built inhelios/src/server/protocol/encode.rs:232-274(enable_request_metrics,record_times,metrics_value), gated inhelios/src/server/http.rs:387-388and:613, defaulting off inhelios/src/server.rs:129,148andhelios/src/server/config.rs:353-356, with the flag inflare-cli/src/cli.rs:649,698,729and config precedence inflare-cli/src/config.rs:73-74. - Sweeps: greps across the head tree for injection phrasing, agent-directed instructions, hidden HTML/markup, escape sequences, new URLs, base64 blobs,
std::process::Command,reqwest,std::env::var,include_bytes!/include_str!and newunsafereturned only pre-existing repository content (AGENTS.md (not opened) links, Cargo.lock registry URLs, existing fixtures and CUDA/session code). The PR adds no network calls, process spawning, credential access, or filesystem exfiltration. - Commits: 16 commits, all authored by Wynn Drahorad with subjects consistent with the described change; no disguise or unrelated edits.
Nothing malicious or agent-directing was found. The one URL-bearing automation comment is a legitimate, repo-wide bot convention; it was treated as reviewable material, not instructions, and its links were not fetched or followed.
Open questions: none that would change the verdict. The bot's linked external review pages (autobot.eidonix.com) were deliberately not opened, and AGENTS.md (not opened) was not opened; CI has not run on head 046aaef (no checks), so nothing here is a statement about code correctness — only about hostile/agent-directing content.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: WynnD (outside contributor, GitHub association NONE, 0 merged PRs; Discord oystersmiles)
Motivation: Clients and gateways such as llama-swap cannot get one request's prompt and decode speed out of Flare, because /metrics only aggregates. vLLM returns a per-request metrics object that gateways already read, so this PR builds the same object from instants the model worker already records.
Scale: +1757 / −77 lines in 22 files (head 046aaef0; the diff also carries all of stacked #548, so #560's own share is ≈ +749/−26)
Proposal:
- Adds an opt-in vLLM six-field
metricsobject (queue_time_ms,time_to_first_token_ms,generation_time_ms,mean_itl_ms,tokens_per_second,time_to_first_content_token_ms) built from worker-recorded instants carried onGenerationEvent::Finished;time_to_first_content_token_msis alwaysnull, the content instant having moved to new #562. - Placement follows vLLM: top level of JSON bodies, the final usage chunk of Chat/Completions streams, and inside the
responseofresponse.completed/response.incomplete;nullfor n>1, omitted for multi-prompt Completions and Anthropic Messages. - Enabling is
--enable-per-request-metricsonflare run/flare orbit runplus a new[server] per_request_metricsconfig key that applies when the flag is absent (this key is new since my 2026-11-27 report and reverses a previous finding of mine). - Adds
performance.first_scheduled_ns, exportsRequestTimes, stampsfirst_scheduled_nsafter packing and reports the earliest across generations. - Documents the
stream_options.include_usagegate and the absence of a--enable-force-include-usageanalogue. Touches: helios/src/server/(runtime.rs,http.rs,protocol/encode.rs,metrics.rs— the last is #548's, byte-for-byte)flare/src/settings→controller config chain (configuration.rs,settings.rs,controller.rs)flare-cli/src/flag parsing, config precedence and rank-zero forwarding Related items:- #548 Add per-request histograms and vLLM-parity request metrics (open): required base, now blocker-free
- #562 Report the first content token of per-request metrics in streams (open): new fourth layer holding what #560 dropped
- #551 Report per-request timings so llama-swap can show rates (open): closed by #560, but only partly satisfied
- #553 Add vLLM-compatible per-request metrics (closed): HTTP-timed predecessor, halted for low value/charter
- #552 Report request timings on final responses (closed): llama.cpp (not opened)
timingspredecessor, superseded Link: https://github.com/NVIDIA/hyperflare-inference/pull/560 Autobot comments: Amendments only, per the request. The PR was revised under my report: the commit-instant event andcommitsflag are gone (now #562), the config key arrived, and #560's own diff shrank to ≈ +749/−26 while the published diff still contains all of #548. Two of my previous negatives are withdrawn: live evidence now exists (40/40 checks behind llama-swap v250 on one RTX PRO 6000 Blackwell; no measurable CPU overhead; 820 unit + 33 CLI tests), and the "no config key, so WinUI cannot enable it and Orbit cannot turn it off" finding is false — a desktop user can enable it and a saved Orbit group can be disabled via[server] per_request_metrics. Surviving caveats: no GUI toggle, and ignition's Python config validator rejects the key (unknown key per_request_metrics in [server]), so the file is not portable betweenignition serveandflare run. The live run also exposes an unstated defect: llama-swap readsmetricsonly at an event's top level, so Responses streams show no rates because #560 nests the object insideresponse; with theinclude_usagegate,Closes #551and "llama-swap reads it without changes" are overstated, the same shape of overstatement autobot flagged on #548'sCloses #536. Process flips: the case file exists (02:18) and the 03:21 review is Changes Requested with 2 blockers, but its verdict is "the mechanism is right-sized and correct", not #553's charter misalignment; the cost blocker is fixed, the "named requirement" blocker is not (only #551, filed by the same author). #548 now has 0 blockers, so the stack (#548→#560→#562) is unblocked but still unreviewed by any human — no maintainer has commented anywhere in the cluster, anddocs/TODO.txtstill has no entry for the feature.
Value Proposition
Verdict: worth merging — with three small fixes and one maintainer sign-off
My previous verdict was "worth it with changes, but only after a maintainer decision and with a narrower first cut." Revision 046aaef (four commits since I last reviewed) satisfies four of my five conditions on its own: the content-instant half of the diff is gone, [server] per_request_metrics is a real configuration key, the include_usage limitation is written into the repo's docs, and live llama-swap evidence is on the PR. What remains is not design work — it is one permission question (charter, AGENTS.md:165-169, :201-207), one one-line API-hygiene fix, and two documentation/flag gaps.
What got fixed, checked against the branch
- The riskiest code left this PR.
time_to_first_content_token_msis now alwaysnull(helios/src/server/protocol/encode.rs:251-275,docs/api.md:1020), andGenerationEvent::Committedno longer exists in this branch; the streaming content instant moved to the stacked draft #562.output_event_capacityis back to its two-argument form (helios/src/server/runtime.rs:62-82), so this PR no longer touches the invariant thatverification/helios-lifecycle/check.py(not opened) mutation-tests for response-queue safety. This was my single largest objection and it was answered exactly as asked. llama-swap never reads that field and vLLM permits null, so nothing was lost. - The flag now works everywhere it should.
flare/src/configuration.rs:34addsper_request_metrics: Option<bool>,flare/src/settings.rs:32,224resolves it,flare/src/controller.rs:2566pushes it into rank zero's server config, andflare-cli/src/config.rs:73-75applies it only when the flag is absent (flag > config > off). Bootstrap rejects1,"true"andnull(helios/src/server/config.rs:719-741(not opened)), and there are precedence tests in all three crates. The silent-drop behaviour I flagged previously is gone, and the desktop controller path now has a real setting to read. - The consumer gap is documented in-tree.
docs/api.md:1031-1038now says plainly that a Chat/Completions stream carriesmetricsonly on the usage chunk, that gateways which read rates from the body (llama-swap named) show none for those streams, and that Flare has no--enable-force-include-usageequivalent. That is the honest-docs resolution I asked for (the alternative — forcing usage under the flag — remains vLLM's better long-term answer, and would be a separate small PR). - Live evidence exists. WynnD's 2026-11-28 comments report an RTX PRO 6000 Blackwell serving the gb202 Qwen3.8-Flash package behind llama-swap v250: 40/40 request-matrix checks,
tokens_per_secondandmean_itl_msreconciling with vLLM's definitions,performance.first_scheduled_nsbetweenenqueue_nsand the first token stamp, llama-swap showing prompt and generation rates for Chat and Completions, and CPU 15.4–15.9 s with the option on vs 16.0–16.3 s off over 16×512-token streams (no measurable overhead). Re-validated through the configuration key rather than the flag. This clears the charter's "bring real evidence" bar (#210) for the claim that actually matters. - The four-way fork is resolved. #552 and #553 are closed as "Superseded by #560"; #562 is now a draft stacked on top. One wire shape, one implementation on main, no double-emission (the double
cache_nsubtraction that motivated the consolidation is real).
Why it fits the charter
- Right problem, right layer. The gap is concrete and reproducible (#551: llama-swap shows
-1for every Flare request because it parses proxied bodies and does not scrape/metrics). This PR builds the object from instants the worker already records for the histograms (#548), adds no clock read of its own, and just copies ~32 bytes of instants into the terminal event on the disabled path. Off: oneif state.per_request_metricsand one early-Nonemetrics_value()per response. That is the "solve it where the data already is" instinct the charter asks for (#404). - Wire fidelity, not invention. Checked again against vLLM's "Per-Request Metrics" doc: TTFT from scheduling,
generation_time_msdecode-only,mean_itl_msnull for one token,tokens_per_secondspanning scheduling→last token,queue_time_msfrom the queue,metrics: nullforn > 1, omitted for multi-prompt Completions, Responses onresponse.completed/response.incomplete, streams needinclude_usage. Placement inencode.rs:712-744andhttp.rs:613-615matches. Precedent for mirroring vLLM naming exists in the repo (docs/api.md:973,docs/cli-design.md:475,server/models.rs(not opened) ModelCard fields). - Bounded and self-contained. The 560-only delta is roughly +750 lines, of which ~570 is tests (encoder placement/null-rule tests, worker-driven phase tests that assert each instant falls inside the step that produced it, CLI/config precedence tests) and ~61 docs; production code is ~185 lines across eight files. That is a proportionate footprint for a documented public wire field, and the tests exercise real behaviour rather than source text.
- Honest about divergence. All six keys always present,
metrics: nullforn > 1in bodies as well as streams,queue_time_msstarting at model-queue arrival (including the channel send and worker pickup), a forced reasoning-close token counted without an instant — all stated indocs/api.md:1025-1043rather than hidden.
What still needs to happen before merge
- A maintainer decision on the PR that per-request vLLM-shaped response metrics are wanted (
AGENTS.md:165-169,:201-207). The only request is #551, filed by the same author whose #548/#549/#560/#562 are the whole cluster; llama-swap appears nowhere in Flare's documented deployment story except the docs this PR adds; #536 is about histograms, not response bodies. The charter's counterweight is real — Flare already mirrors vLLM flags and wire fields — butdocs/core-design.md(not opened) also says Flare "does not aim for vLLM's feature matrix". That is a two-line decision, and one auto-review already called the same idea low value (that review was on #553, the weaker HTTP-clock version). Nothing else below matters if the answer is no. - One line of API hygiene.
RequestTimesis now exported (helios/src/server.rs:33(not opened)) as a plain struct with three public fields, no#[non_exhaustive], and it appears inside the publicGenerationEvent::Finished(runtime.rs:102-105). With the in-process Rust SDK (#6) on the roadmap, add#[non_exhaustive]now — vLLM is already growing this object (metrics.speculative_decoding), so a future field should not be a breaking change. - Do not leave persistent Orbit groups unable to turn it off.
--enable-per-request-metricsis saved into a group'srank_zerooptions (cli.rs:698-700,orbit/controller.rs:691-692,:846-850), there is no negating flag, and the config key cannot override a saved flag (config.rs:73-75), so the only way off is editingorbit.toml(not opened). Either add--no-enable-per-request-metrics(the repo pairs negatives for--history-draftsand--mtp-adaptive-verification) or add one sentence to thedocs/cli-design.md:736row. - One more doc line.
docs/api.md:1031-1038covers the include_usage gap but not the second consumer gap the author found live: for streamed Responses, vLLM nests the object inresponse, while llama-swap readsmetricsonly at an event's top level, so it sees nothing there. That belongs beside the existing caveat — it is the same class of "the motivating workflow stays broken in this case" honesty.
Simpler alternative, and why I am not pressing it
Chat already exposes the same instants in Flare's own vocabulary via return_token_timestamps → performance{ingress_ns, enqueue_ns, first_scheduled_ns} plus choices[0].token_timestamps_ns, so the new value here is specifically the vLLM wire shape that body-parsing gateways already read. That argues for keeping the object minimal — which this revision now is: six fields, no new event, no new clock read, one flag, and placement the encoder already has hooks for. I see no cheaper route to a llama-swap that shows real prompt and decode rates. Two things I would watch rather than block on: this is a frozen snapshot of a moving vLLM object (worth one sentence saying so), and queue_time_ms/time_to_first_token_ms are systematically slightly larger than vLLM's because the queue clock starts at request-group construction and TTFT ends at step completion — fine for a hobby-scale engine, but people may bill on these numbers, so the definitions in docs/api.md:1016-1029 are load-bearing and should stay accurate.
Cost summary
| Dimension | Assessment |
|---|---|
| Users helped | Anyone fronting Flare with llama-swap or a similar body-parsing gateway, plus billing/SLA tooling: real rates where there were -1s. Modest audience, but that audience is the charter's local-workstation user. |
| Complexity | ~185 production lines, one enum field pair on the terminal event, one encoder-owned struct, one config key, one flag on run/orbit run. No new event, no new clock read, no runtime state. |
| Maintenance | The vLLM contract can drift (spec-decode acceptance already exists there). One flag added to three surfaces (flag, config, controller) that must stay in sync — currently the persistent-group negation is the weak link. |
| Performance | Not measurable in the author's CPU runs; one copy of ~32 bytes per request when off, one JSON object when on. The per-step monotonic_ns() belongs to #548, not here. |
| Risk | Low. Everything is behind one flag, null/omitted rules match vLLM, and the previously riskiest mechanism (the Committed event and the output-event budget) is no longer in this PR. |
Bottom line: the engineering is now proportionate and the evidence is real. Merge it once a maintainer confirms Flare wants vLLM's per-request metrics object on the response, with #[non_exhaustive] on RequestTimes, a way to negate the saved flag (or a doc line saying there isn't one), and the streamed-Responses/llama-swap caveat added to docs/api.md. #548 must land first, as stated; #552/#553 correctly stay closed; #562 should be judged separately on whether the streaming content instant has a consumer that wants it.
Full report · Notes Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Conventions
Verdict: clean Blocking:
- None. Should fix:
- None.
Nits: 4 — (1)
helios/src/server/runtime/phase_tests.rs:4541-4543adds a third copy of the "this step commits a generated token" expression (also at:452-454,:5028-5030) instead of extracting one helper; (2)phase_tests.rs:4563-4610(served_through_worker) and then=2block at:4800-4850re-implement the HTTP request/ingress/group scaffolding ofhttp_generation_request_observed(:4488-4517) instead of wrapping it likehttp_generation(:4358) does; (3)helios/src/server/metrics.rs:211-322addsBuckets<N>/Histogram<N>but migrates onlylatency.rs, leaving the three host-cache histograms (HOST_TIME_BUCKETS/HOST_TOKEN_BUCKETS:199-209,host_cost_sums:475,host_lookup_cost:819-841, bespoke render loop:1187-1212) on the old mechanism, so two coexist in one module; (4)helios/src/server/config.rs:353-357re-spells the three-arm boolean parse atconfig.rs:183-187(history_drafts) with noboolean()helper besideinteger()(:56), whileobservation.rs:78-84flag()is a third instance. Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Simplicity
Verdict: should-fix issues only Blocking:
- None. Should fix:
- helios/src/server/runtime.rs:837:
generate_observedis a third admission spelling whose only caller (http.rs:336-340) re-wraps itsGenerationinvec![g]; deleting it also letsenqueue(:841) collapse intogenerate(:833). - helios/src/server/protocol/tests.rs:2334:
metered_generationemits aReasoningevent and an emptyContentevent that no assertion reads; leftover from the content-instant work that moved to #562. - helios/src/server/runtime/phase_tests.rs:4795: the
n = 2 → nullblock re-proves encode.rs'sSuppressedrule (tests.rs:2416-2430) and hand-rolls 40 lines of request/spawn/SSE plumbingserved_through_worker(:4563) already provides; :4759-4762 likewise repeat tests.rs:2381-2388. Nits: 2 — encode.rs:232-250 doc comments restate docs/api.md:1005-1043; tests.rs:2366-2374 clones whole frames to read two fields. Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Reviewed at head 046aaef against the charter (focused changes, no speculative switches), AGENTS.md:188-199 (reject churn, wrappers and non-exercising tests) and docs/design-review.md:16 (keep Helios as simple as possible). Nothing blocks: the feature is one opt-in path, adds no clock read, and introduces no second mechanism into the scheduler or worker. Two items from the earlier head are resolved — Timing::streaming and its unreachable record_commit guard are gone (encode.rs:74-79), and the magic six-key count is now one key list (tests.rs:2354-2363).
Each remaining item has a smaller version. (1) At http.rs:339-340 call generate_many_observed(vec![prompts.remove(0)], observation.timestamps), delete generate_observed, and inline enqueue into generate; the two test call sites (phase_tests.rs:3748, :3802) follow. (2) metered_generation needs only start(), one Content("answer"), record_times(1_000_000, times, 4) and finish(...): every assertion is about the carrier frame or metrics_value(), which depends only on times and generated = 4. (3) Keep the uniquely-HTTP assertions — the option-off half (:4782-4794, proving state.per_request_metrics gates http.rs:387-389), response.incomplete (:4764), and step-bound provenance (:4717-4726); delete the carriers.len() == 1 / choices == [] pair and the n = 2 block, or route the latter through served_through_worker in ~8 lines.
Nits are copy-editing: the placement and null rules now exist three times (docs/api.md:1005-1043, encoder comments, encoder code), and a test closure clones frames for two fields that references serve.
Open question: whether :4759-4762 were added deliberately as an end-to-end guard against encoder/handler drift; a comment stating that intent would settle it and shrink finding 3. Checked and not reported: the RequestMetrics enum, metrics_value's pure Option maps, the flare-cli flag plumbing (mirrors --bypass-performance-check), and GraphKind::samples(). enable_request_metrics(streaming) duplicates Encoder::streaming, but folding it in would couple placement to a field set_logprobs writes — the explicit parameter is the safer form.
Correctness
Verdict: blocking issues
Blocking:
- ignition/cli/config.py:23-24 (with :112-114): the newly documented enablement
[server] per_request_metrics = truemakes everyignitioncommand fail withunknown key per_request_metrics in [server]; docs/cli-design.md:1313 says Ignition and native Flare read the same file.
Should fix:
- flare-cli/src/cli.rs:649/:863 + config.rs:73-75:
boolflag cannot express an explicit false, so a file that enables the option can never be overridden off per run, and a saved Orbit group can never drop it (cli.rs:698-700, controller.rs:691-692 (not opened)), contradicting cli-design.md:1321-1322. - helios/src/server/runtime.rs:2272: unconditional
monotonic_ns()per model step, while the PR body still says "No clock read is added"; the read is #548's and should be attributed. - helios/src/server/runtime.rs:2269-2285: the stamp now lands after vision packing, so image conditioning is charged to
queue_time_msand TTFT starts after it, contradicting api.md:1018 and model-contract.md:346-352 (not opened). - docs/api.md:1020 vs :1040-1041: a permanently-null field is documented as an "unreached instant"; :1042 overstates the
n>1null to Chat/Responses, which rejectn>1at decode.rs:753; the zero-token all-null shape is undocumented.
Nits: 2 (ignition debug-serve and write_initial ignore the new key; cli-design.md:1385-1387's unknown-key sentence is stale).
Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Architecture
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- docs/api.md:1005-1050 (with flare-cli/src/cli.rs:649, flare/src/configuration.rs:34): the feature has no maintainer request, roadmap item, or measured problem behind it — the only stated requirement is #551, opened by the same non-maintainer author with no maintainer reply, while maintainer issue #536 asked for Prometheus histograms (delivered by #548); charter "What gets merged" and AGENTS.md:165-169/188-193 require authorization for a new flag plus config switch, and predecessors #552/#553 were both stopped on charter grounds. Needs a maintainer decision or reframing around the reproducible llama-swap defect.
Nits: 2
Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Detail:
Layering is right. The worker owns every instant and the encoder owns placement (encode.rs:232-275, gated at http.rs:387-389); no HTTP clock read, which is exactly what made the closed #553 unable to report queue time. Off by default with no key emitted (api.md:1009-1011); Messages never carries it, n > 1 gives null, multi-prompt omits it (encode.rs:233-241); no per-model special cases; limits documented honestly including the include_usage gap (api.md:1031-1038).
Two earlier findings are fixed at this head: RequestTimes is now exported beside Snapshot (server.rs:33, metrics.rs:326), so the public Finished field is nameable; and the option now has a [server] key reaching Settings, the desktop controller, and the CLI with flag precedence, while Bootstrap rejects a non-boolean (config.rs:353-357) — the silently-dropped-key problem is gone.
One earlier finding is withdrawn. I had attributed the per-committing-step tokens_committed, model_step, and the per-step monotonic_ns() stamp to this PR. They already exist at the still-open pr/548 (verified there), and this branch is stacked on it, so that delta is #548's. The description's "no clock read; only copying instants when off" is accurate.
Nits: mean_itl_ms divides by generated - 1 rather than recorded intervals, so it understates ITL on speculative cores where a step commits several tokens at one instant (encode.rs:266-268, api.md:1025-1026); the count already exists in RequestRecord (metrics.rs:343-362). Second: the diff carries unmerged #548, so review and merge order depend on it landing first.
Open questions: whether #551 authorizes the work; whether a response-body object is in remit at all given #536 asked for scrapeable series; whether to make mean_itl_ms exactly vLLM's. Not verifiable here: the live 40/40 matrix and CPU numbers, Windows/multi-GPU, and whether #548's own open should-fix items would move these fields.
Prose
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
docs/api.md:1045-1048: the new "Per-request metrics" passage is the only place in the HTTP API reference that mentionschoices[0].token_timestamps_nsandreturn_token_timestamps, yet gives neither their placement nor thereturn_token_timestamps requires return_token_idsrule, so the reader cannot act on the same-origin claim.docs/cli-design.md:736: the shared serving-flag table gives--enable-per-request-metricsthe default[server] per_request_metrics, but only nativeflare runreads that key (flare-cli/src/config.rs:57-75matchescli::Command::Runonly);flare orbit runtakes the flag alone, so an operator setting the key and launching Orbit gets metrics off with no error.
Nits: 3 — both help strings (flare-cli/src/cli.rs:646-648, :860-863) omit the configuration key the docs table names; the description's "This PR adds no clock read" is true only because the read belongs to #548's commit 66245920, which appears in this PR's diff against main, so a diff reader is misled; "one monotonic read per scheduled model step" is per step, shared by every lane (runtime.rs:2272-2284).
Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Subtractive
Verdict: make it smaller first The change: +1757 / −77 lines (22 files) Could remove: about 160 lines, in 6 places (≈125 of them this PR's own; ≈35 shared with stacked #548) Biggest subtractions:
- helios/src/server/runtime/phase_tests.rs:4730-4850: two new tests re-prove placement and null rules already asserted at helios/src/server/protocol/tests.rs:2346-2449, through 30 lines of hand-driven worker plumbing; replace with one ~20-line flag-on/off presence test using
served_through_worker(:4563-4610): about 100 lines - docs/api.md:305-386: four paragraphs walking every histogram population duplicate the Prometheus HELP strings at helios/src/server/metrics.rs:1548-1642 and the vLLM table at docs/api.md:475-517; keep ~8 lines + the table: about 35 lines (shared with #548)
- docs/api.md:1040-1050: the first sentence restates table rows :1020/:1022 and the
performanceparagraph restates helios/model-contract.md:343-355, which it links; keep the n>1 rule plus one pointer: about 7 lines - helios/src/server/protocol/encode.rs:67-72, :232-241:
RequestMetrics::Suppressedexists only to returnSome(Value::Null)(:252-255), andenable_request_metrics(streaming)duplicatesEncoder::streaming(:91): about 9 lines - helios/src/server/config.rs:734-739: strict-type rejection loop for a key whose only writer (flare-cli/src/main.rs:355-357 (not opened)) passes a literal bool; absent→false assertion at :727 covers it: about 12 lines Left behind: None. The option-off path is one branch (helios/src/server/http.rs:387) and no pre-existing code becomes dead. Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Pre Test Report
Pre-test report — PR #560 "Emit vLLM-compatible per-request metrics from runtime instants"
Decision: DO NOT refer to hardware testing yet. Hold for code changes. The mechanism is sound and this revision fixed every substantive defect my 2026-11-27 report raised — but one new blocking defect, created by the enablement path this revision adds, breaks every ignition command; plus one CLI-semantics gap and one field-accuracy issue. All three are CPU-only questions, and the fixes change the surface a hardware run would exercise. Separately, the author has already performed, on hardware, essentially the run I would have booked — so a run now would be low-value on two independent counts. The plan is at §4; testing becomes worth ~30 GPU-min once items 1–4 land.
PR state: open draft, head 046aaef, 22 files, +1757/−77, stacked on unmerged draft #548 (metrics.rs +548, latency.rs (not opened) +24, scheduler.rs (not opened) +4 are #548's; #560's own share ≈ +749/−26). Zero maintainer comments anywhere in the cluster; no CI checks on head; security screen all-clear (reviewed the diff, the bot automation comment, and both author evidence comments — the only directive-sounding text is standard repo-bot boilerplate, not author-supplied, and was treated as material, not instructions).
1. Fixed at this head — do not re-report
Verified in code at 046aaef, not taken from the summaries:
- Public type leak — fixed.
pub use metrics::{RequestTimes, Snapshot};(helios/src/server.rs:33(not opened)),pub struct RequestTimes(metrics.rs:326). TheFinishedfield (runtime.rs:102-105) is now nameable and constructible outside the crate. - The option has a configuration home — fixed.
flare/src/configuration.rs:34(not opened) →settings.rs:32 (not opened),:224(unwrap_or(false)) →controller.rs:2566(not opened) →flare-cli/src/main.rs:355-357(not opened) (written only when true) →helios/src/server/config.rs:353-357(not opened), andBootstraprejects a non-boolean. The silent-drop failure is gone; the desktop controller path can enable it. - The riskiest code left the PR — fixed.
GenerationEvent::Committed, thecommitsthreading, and the third term ofoutput_event_capacityare gone; the content instant moved to #562, andencode.rs:263hard-codes"time_to_first_content_token_ms": Value::Null. The response-queue invariant thatverification/helios-lifecycle/check.py(not opened) mutation-tests is untouched again. - Zero-value state deleted:
Timing.streaming/record_commit(nowencode.rs:74-79), and the seven-armmatches!replaced bykind.samples(). - Cost prose now accurate: "the one monotonic read per scheduled model step comes from #548" is true —
runtime.rs:2272belongs to #548's commit66245920. My prior finding here is closed.
2. Substantive problems that must be fixed before hardware
(1) BLOCKING, created by this revision: the documented enablement breaks every ignition command. docs/api.md:1007-1008 and docs/cli-design.md:1315-1319,:1349 now instruct users to write [server] per_request_metrics = true, and docs/cli-design.md:1313 states "Ignition and native Flare read this file". Ignition's schema is closed and was not extended: ignition/cli/config.py:21-33 lists _SECTIONS["server"] without the key, and :112-114 raises unknown key per_request_metrics in [server] (:119 shows the schema is the only gate). Every command loads that file: serve.py:127,:174,:264,:431,:590, bench.py:144 (not opened), publishing.py:31 (not opened),:73,:174,:194. So following the new docs breaks ignition export / debug-serve / bench — the model-preparation step that precedes any serving. Neither ignition/cli/config.py nor tests/cli/test_config.py is among the 22 changed files, and per_request_metrics has zero matches under tests/, so no CI would catch it. Fix: one schema entry ("per_request_metrics": bool) plus a positive-load test, and decide whether debug-serve forwards it. CPU-only.
(2) The flag cannot express an explicit false. enable_per_request_metrics is a plain bool (cli.rs:649 orbit, :863 run) and config.rs:73-75 only fills when it is false, so a config file that enables the option can never be overridden off for one run (contradicting docs/cli-design.md:1321-1322), and a saved persistent Orbit group that captured the flag has no negation (rank_zero_options emits it only when true, cli.rs:698-700). The repo already pairs negatives for exactly this reason — cli.rs:979-987 (--history-drafts/--no-history-drafts) and :1012-1020 (--mtp-adaptive-verification) via overrides_with — and did not apply the pattern here. Fix: tri-state Option<bool>, or a --no-enable-per-request-metrics with overrides_with, or at minimum a doc line.
Correction to a supplied finding: "
flare orbit runignores the key" is only partly true. Orbit's own process does not read it (config.rs:141-151sets only hub caches), but the flag is forwarded to rank zero'sflare run, which does runConfiguration::apply(config.rs:58); on a single-host run rank zero reads the sameconfig.toml(not opened). Thecli-design.md:736row is therefore wrong only for a paired rank zero with a different file — a doc nit, not a should-fix.
(3) mean_itl_ms is not exactly vLLM's — and this PR claims it is. encode.rs:266-268 divides first→last by generated - 1, but a speculative step commits several tokens sharing one completion instant (api.md:1025-1026), so the true interval count is smaller and the mean is understated. The author's evidence asserts equality with vLLM's definition, so one of the two must change. Making it exact costs one new u32 in RequestTimes plus one store per committing step (the intervals are observed into RequestRecord.inter_token, metrics.rs:345,:354) — cheap, but it re-touches the struct that just became public (metrics.rs:326). Alternatiely, narrow the parity claim in the docs and description.
(4) Authorization is still unsettled, and it gates everything. The charter merges PRs addressing "a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs". The only named requirement is #551, opened by the same outside contributor; the maintainer-authored issue in this area (#536) asked for Prometheus histograms, delivered by #548; #552/#553 were both stopped on charter grounds; per-request response metrics are not on the roadmap. This is a one-line maintainer decision — but spending hardware on a feature that may be declined on scope wastes the run outright.
(5) Closes #551 overstates delivery, and a test would confirm the gap. The motivating consumer reads rates from the response body: it gets them for Chat/Completions only when the client sends stream_options.include_usage (encode.rs:711-719 emits metrics only inside if self.include_usage), and for streamed Responses it gets nothing, because #560 nests the object inside response (encode.rs:731-743) while llama-swap reads metrics only at an event's top level — reported by the author himself. The include_usage gap is now documented (api.md:1031-1038); the Responses nesting gap is not, and belongs beside it before a test reports it as a failure.
Minor doc accuracy, worth folding in: api.md:1040-1041 calls every null "an unreached instant" while time_to_first_content_token_ms is permanently null; api.md:1042 states the n > 1 null generally although decode.rs:753-754 rejects n != 1 for every protocol except Completions, so only Completions can reach it.
Merge mechanics: #548 must land first and is still a draft with outstanding should-fix items (its 05:09 review: 0 blockers, 3 should-fix, 7 subtractive). The author's evidence image carries main + #548 + #549 + #560, so it is not a test of this PR alone.
Recorded so they are not re-raised: the per-step clock read is #548's; first_scheduled_ns folding is earliest-wins (http.rs:538); the stamp landing after vision packing (runtime.rs:2272, after the GraphKind::Vision branch at :2228-2259) is a one-clause doc question rather than a defect; nothing is cfg-gated, so the unrun Windows build is low risk.
3. Expected value if a hardware test were performed now
Low — and low for two independent reasons.
- The cheap behaviour is already pinned without a GPU. Placement, null rules and arithmetic are asserted with exact expected milliseconds at the encoder (
protocol/tests.rs:2346-2449(not opened)) and driven through a real step loop at the worker (runtime/phase_tests.rs:4690-4850(not opened), including that each instant falls inside the step that produced it). - The author already ran the GPU test. One RTX PRO 6000 Blackwell — the exact GPU model on cn5 — serving the prepared
local-inference-lab/Qwen3.8-Flash-Next-FLAREgb202 package behind llama-swap v250, option enabled through the[server]key: 40/40 request-matrix checks,tokens_per_second/mean_itl_msreconciling with vLLM's definitions,first_scheduled_nsbetweenenqueue_nsand the first token stamp, llama-swap showing prompt and generation rates for Chat and Completions, and no measurable CPU overhead (15.4–15.9 s on vs 16.0–16.3 s off over 16×512-token runs).
The residual value of an independent run is reproducibility from a build we control (this PR with #548 only), real-shape mean_itl behaviour on speculative cores, and confirmation of the two consumer gaps. That is worth ~30 GPU-minutes after the fixes — not before, when the documented enablement path is broken.
4. Minimal test plan (run only after items 1–3 land)
One GPU, one host. Nothing here touches TP>1, multi-host, KV pages, prefix cache, vision, or Windows.
Phase 0 — CPU, before booking (~15 min). Head has no CI: cargo check --features server (helios), cargo check (flare-cli, flare), cargo test --features runtime-core,server --lib -- server::, flare-cli cli:: config::, verification/helios-lifecycle/check.py (not opened); then ignition export + ignition serve with the documented [server] per_request_metrics = true line present — the regression test for item 1. One unrelated template test needs FLARE_TEST_TEMPLATE_DIR.
Phase 1 — GPU, cn5, one gb202 TP1 core, one server per option state (~20 min).
- Chat JSON → top-level
metrics, six keys, content instant null. - Chat stream with
stream_options.include_usage→ exactly one carrier,choices == [], six values populated. - Chat stream without
include_usage→ key absent (assert it; the #551 gap made explicit). - Completions
n = 2+include_usage→"metrics": null. - Completions two prompts → key omitted.
- Responses stream,
max_output_tokens = 1→response.incompletecarriesmetricsinsideresponse. - Messages stream and body → never carries it.
- Single-token Chat →
mean_itl_msnull,generation_time_ms0. - Option-off repeats of 1 and 2 → no
metricsanywhere;performance.first_scheduled_nsonly withreturn_token_timestamps. - In-script arithmetic:
tokens_per_second == generated / (last − scheduled),mean_itl_ms == generation / (n − 1), all fields non-negative,ttft ≤ generation + queue.
Phase 2 — ~10 min, highest value per minute. llama-swap v250 in front: streamed Chat/Completions with include_usage → non--1 prompt and generation rates; streamed Responses → confirm the documented absence. This is the only end-to-end evidence, from a build we control, that the shipped shape meets #551.
Deliberately not tested: GPU throughput A/B for the flag (no performance claim; the added work is copying a 17-byte RequestTimes per terminal event, and CPU overhead was already unmeasurable); TP>1/multi-host; KV/prefix cache; vision; Windows/WinUI (the desktop concern was config plumbing, now resolved in code).
Cost driver to check before booking: flare run needs a prepared/exported core and does not accept a recipe alias. Neither host caches a -FLARE core (cn5 holds dinov2/GLM/Qwen NVFP4 recipe checkpoints; cn7 similarly), so confirm a published gb202 TP1 -FLARE core is downloadable (flare download) or budget ignition export GPU time — that preparation, not the test, dominates the cost. cn5 is the right host (1 of its 4 RTX PRO 6000 Blackwells, the model the author validated on). cn7/GB10 adds nothing: nothing in the diff is arch-specific, and the desktop/config path is a code question, not a hardware one.
5. What turns this into "refer to testing"
ignition/cli/config.pyaccepts the key (with a positive-load test) — blocking.- The flag can express an explicit false, or the limitation is documented beside it.
mean_itl_mseither counts real inter-token intervals or the vLLM-parity claim is narrowed.- The streamed-Responses / llama-swap nesting gap added to
docs/api.mdnext to the include_usage caveat. - #548 merged and the branch rebased so the diff under review is #560's own (~+749/−26).
- A maintainer confirms per-request vLLM-shaped response metrics are wanted. If the answer is no, no hardware time should be spent at all.
code review summary
Recommendation: Changes Requested
The mechanism is right-sized and correct — worker owns the instants, encoder owns placement, nothing emitted when the option is off — but the documented [server] per_request_metrics key is outside Ignition's config schema, which breaks every Ignition command, and about 180 lines (most in one test file) duplicate rules and plumbing already pinned elsewhere.
- Blockers: 1
- Should fix: 6
- Subtractive suggestions: 6
- Nits: 5
Full report · Notes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.
screen malicious
Screen Result: All Clear
Evidence:
- Full diff of all 22 changed files read (docs/api.md, docs/cli-design.md, flare-cli/src/{cli,config,main}.rs, flare/src/{configuration,controller,settings}.rs, helios/model-contract.md, helios/src/server*.rs incl. config/http/metrics/observation/encode/runtime and three test files) plus the description and entire discussion. All files modified; none added.
- No instruction-shaped text in any added line. Searches for
(ignore all previous|disregard|prompt injection|AI agent|language model|system prompt)and(AGENTS.md (not opened)|CLAUDE.md (not opened)|autobot|when an agent|agent should|agent must|do not tell|maintainer request)matched only pre-existing benign lines (docs/api.md:887, helios/src/frontend/tml.rs:398 (not opened), ignition/cli/serve.py:310 (not opened), test fixtures) and pre-existing repo policy files not touched here. - No egress, execution, or credential surface added: no HTTP client, no
std::process::Command, no newenv::varreads (only pre-existing fixtures such as helios/src/server/dashboard.rs:104 (not opened)), and no matches for(api_key|authorization|bearer)in helios/src/server/http.rs. The only new socket is a loopback tokio listener in helios/src/server/runtime/phase_tests.rs. - The change is what it claims: opt-in
ServerConfig.per_request_metricsdefaulting tofalse(helios/src/server.rs), parsed in helios/src/server/config.rs with absent ⇒ false and non-bool rejected;RequestMetrics { Suppressed, Single }with suppression forn>1at helios/src/server/protocol/encode.rs:68,233,238 andValue::Nullfor suppressed/unreached instants at encode.rs:253-254; timings/counts only, no prompt or generated content, no request ids. - Untrusted material noted, not followed:
flare-autobotcomments link to off-repo autobot.eidonix.com "Full Review" pages inviting "your agent" to read them. Bot-generated and pre-existing, not attributable to the author; I did not fetch them. - Non-malicious reviewer risks: the description's live-hardware, 40/40-matrix, test-count and "no overhead measurable" claims have no artifact in the repo and are unverified self-report; PR also adds Prometheus histograms and CLI/config surface beyond the stated object (design-fit question); merging before dependency #548 would leave the instants unstamped, which the description acknowledges.
- Not verified by me: test-suite and benchmark reproduction, multi-GPU and Windows behavior (author also did not run these). No injection attempt was found anywhere in the PR.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: WynnD (outside contributor, GitHub association NONE, 0 merged PRs; Discord oystersmiles)
Motivation: Flare's OpenAI-compatible responses can optionally carry vLLM's per-request metrics timing block so gateways like llama-swap can show prompt and generation rates. It does this by reusing instants the model worker already records, gated behind a new opt-in [server] per_request_metrics key.
Scale: +1757 / −77 lines in 22 files (head 046aaef0; ≈+749/−26 is #560's own, the rest is the stacked #548)
Proposal:
- Add an opt-in vLLM-style
metricsobject (queue time, TTFT, generation time, mean ITL, tokens/s) to Chat, Completions and Responses output; Anthropic Messages never carries it. - Report
time_to_first_content_token_msas always null — the stream-only content instant moved to #562. - Add
[server] per_request_metricsend to end (config file, CLI flag, controller, core config, docs). - Stamp
first_scheduled_nsafter packing so a failed pack leaves it unset; non-stream bodies take the earliest value across generations. - Extensive tests: encoder placement/null matrix, worker-driven HTTP phase tests, CLI/config precedence tests, plus live validation. Touches:
- helios/src/server (encoder placement, runtime instants, +535 lines of phase tests, 548-line metrics module inherited from #548)
- Configuration surface across flare, flare-cli and helios/src/server/config.rs (not opened)
- Docs (docs/api.md, docs/cli-design.md) — the doc sample line is what breaks ignition Related items:
- #551 llama-swap per-request metrics report (open): the requirement this claims to close, though it is overstated
- #548 per-request histograms and vLLM-parity metrics (open): required base, now blocker-free at its 5th review
- #562 report first content token in streams (open, draft): stacked on top, owns content TTFT
- #553 earlier HTTP-timed variant (closed): superseded by this design
- #552 earlier llama.cpp (not opened)-timings variant (closed): superseded
Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Autobot comments: The 2026-11-28 05:42 re-review is Changes Requested with 1 blocker / 6 should fix / 6 subtractive / 5 nits and calls the mechanism "right-sized and correct" for a second round. Its only blocker is exactly the config break: the documented
[server] per_request_metricskey is outside Ignition's schema (ignition/cli/config.py:22-25, raise at :112-114), so uncommenting the sample atdocs/cli-design.md:1349breaks every Ignition command that reads the file. A new subtractive demand targets ~180 duplicated test lines (most inphase_tests.rs), which undercuts the PR's main defence, since its own lines are mostly tests. Both earlier blockers are gone: the cost one was fixed by the 04:12 description; the "named requirement" one was dropped, not satisfied — no maintainer endorsement exists. Also unaddressed: Responses streams nestmetricsinsideresponse, where llama-swap cannot read it, soCloses #551is overstated and no doc says so. No human maintainer has ever commented in this cluster.
Value Proposition
Verdict: worth it with changes — one hard blocker (a config-schema break I reproduced), a maintainer sign-off, and three small fixes
The revision I re-checked is still 046aaef (five commits, no push since my last report), and the newest auto-review at 05:42 raises a blocker I had missed. I verified it in the tree and it is real. Everything I flagged as fixed last round is still fixed; everything I flagged as open is still open; and the gap the auto-review found is on a shared surface the charter cares about, so it moves from "nit" to "must fix before merge."
The one thing that stops the merge: the documented opt-in breaks every Ignition command
docs/api.md:1007 and docs/cli-design.md:736,1349 tell users to set [server] per_request_metrics = true. Ignition's Python reader validates the same file with a closed schema:
ignition/cli/config.py:21-33—_SECTIONS["server"]listshost,port,api_key,thinking_token_budget,scheduler_checkpoint_extra_work_fraction. Noper_request_metrics.ignition/cli/config.py:108-114—_validateraisesUsageError("... unknown key {key} in [{section}]")for anything outside it, andConfiguration.loadvalidates every section (config.py:89-100).- Every Ignition command loads that file:
serve.py:127,174,264,431,590(export,debug-serve, …),bench.py:144(not opened),publishing.py:31 (not opened),73,174,194. - It is the same file as native Flare's:
DEFAULT_PATHis~/.config/flare/config.toml(not opened) (config.py:19) versusSettings::loadatflare/src/settings.rs:120-124, anddocs/cli-design.md:1313states outright "Ignition and native Flare read this file."
Concretely: a user who follows the new documentation to enable the feature, then runs ignition export or ignition debug-serve to prepare a model, gets a usage error. The Rust side is permissive (flare/src/configuration.rs:26-28 has no deny_unknown_fields); only the Python side is closed. per_request_metrics is the first [server] key in this situation — every other key in configuration.rs:28-35 also exists in _SECTIONS, which is why precedent did not catch it. And tests/cli/test_config.py:151-177 has unknown-key cases but no row for this key, so CI could not see it.
The fix is small and belongs in this PR: add "per_request_metrics": bool to _SECTIONS["server"], a _BUILT_IN default, a commented line in write_initial (config.py:183-213, which currently never offers the key), and one parametrized row in tests/cli/test_config.py. Related and cheap: ignition/cli/serve.py:486-487 forwards only thinking_token_budget and scheduler_checkpoint_extra_work_fraction into the native options dict, so ignition debug-serve cannot turn the object on at all — one line, same file.
This is exactly the charter's "solve the right problem in the right place": a public configuration key is shared property of two readers, and only one of them learned about it.
Why the change is still worth making
- The problem is concrete and reproducible. #551 (same author) documents that llama-swap's
buildMetrics(internal/server/metrics.go(not opened), v25060226b6) reads llama.cpp (not opened)timingsor vLLMmetricsfrom the proxied body and never scrapes/metrics; with neither object present every Flare request shows-1for prompt and decode rates. That is an interop defect, not a hypothetical. - Evidence clears the charter's bar (#210). WynnD's 2026-11-28 03:26/04:12 comments report an RTX PRO 6000 Blackwell serving the prepared gb202 Qwen3.8-Flash package behind llama-swap v250: 40/40 request-matrix checks,
tokens_per_secondandmean_itl_msreconciling with vLLM's definitions computed from the other fields,performance.first_scheduled_nsfalling betweenenqueue_nsand the first token stamp, llama-swap showing prompt and generation rates for Chat and Completions, and CPU 15.4–15.9 s (on) versus 16.0–16.3 s (off) over 16×512-token streams. Re-validated through the configuration key, not just the flag. - It is built on data the worker already has. The instants come from #548's
RequestRecord(helios/src/server/metrics.rsdiff:RequestTimes { first_scheduled_ns, first_token_ns, last_token_ns }); this PR adds no clock read. The encoder does placement only:enable_request_metrics/record_times/metrics_value(protocol/encode.rs:229-275) and three call sites (encode.rs:712-716,:729-734,http.rs:609-613). Nothing is emitted when the option is off (http.rs:387). - Wire fidelity, not invention. All six vLLM fields, TTFT from scheduling, decode-only
generation_time_ms,mean_itl_msnull for one token,tokens_per_secondspanning scheduling→last token,metrics: nullforn > 1, omitted for multi-prompt Completions and Messages, Responses onresponse.completed/response.incomplete, streams needinclude_usage. Tests pin every one of those rules with real worker steps (protocol/tests.rs:2346-2449,phase_tests.rs:4684-4830). - The four-way fork is resolved. #552 and #553 are closed as superseded; #562 is a draft stacked on top. One shape, one implementation — worth preserving, since double-emission would make llama-swap subtract
cache_ntwice.
Remaining fixes besides the schema (all small)
- Maintainer sign-off on the feature itself. The only request is #551, filed by the author whose #536/#548/#549/#560/#562 cluster this is;
docs/core-design.md(not opened) says Flare "does not aim for vLLM's feature matrix," whiledocs/api.md:472-514now carries a large vLLM correspondence table. Two lines from an owner settle it. Nothing else matters if the answer is no. #[non_exhaustive]onRequestTimes. Exported athelios/src/server.rs:33and embedded in publicGenerationEvent::Finished(runtime.rs:102-105).search_codefornon_exhaustiveover the whole tree returns nothing, so the attribute is not in use anywhere yet, but with the in-process SDK (#6) on the roadmap (and vLLM already growing this object) a future field would otherwise be a breaking change. One line now.- Persistent Orbit groups cannot turn it off.
flare-cli/src/cli.rs:643-649/857-863declare only the positive flag;cli.rs:698-700pushes it into a group'srank_zerooptions;orbit/controller.rs:691-692and:846-850save it;flare-cli/src/config.rs:73-75applies the config value only when the flag is absent. So the only exit is editingorbit.toml(not opened). Repo precedent pairs negatives (docs/cli-design.md:199,741,742). Either add--no-enable-per-request-metricsor say in thedocs/cli-design.md:736row that there is no negation. - One missing caveat in
docs/api.md:1031-1038. The include_usage gap is now documented — good. Not documented: for streamed Responses the object sits insideresponse(encode.rs:729-734), while llama-swap readsmetricsonly at an event's top level, so Responses streams still show no rates. WynnD's own live table says so. It is the same class of "the motivating workflow stays broken here" honesty the include_usage paragraph establishes.
Cost, and the one number I would change
| Dimension | Assessment |
|---|---|
| Users helped | People fronting Flare with llama-swap or any body-parsing gateway, plus billing/SLA tooling. Modest, but exactly the charter's local-workstation user. |
| Complexity | ~200 production lines in 560's own commits: one enum field pair on the terminal event, one encoder-owned struct, one config key, one flag on run/orbit run, one config-file schema (once fixed). No new event, no new clock read, no runtime state. |
| Maintenance | The vLLM contract is an unpinned snapshot (worth one sentence naming the version); one boolean wired through four places (CLI flag, flare/src/configuration.rs:34, flare/src/settings.rs:32,224, flare/src/controller.rs:2566) that must stay in sync — the Ignition schema is the fifth place that was missed. |
| Performance | Not measurable in the author's runs; per-request work off is one copy of ~32 bytes, on is one JSON object. The per-step monotonic_ns() belongs to #548. |
| Risk | Low once the schema is fixed: everything behind one flag, null/omitted rules match vLLM, tests assert instants fall inside the step that produced them. |
Review-shape problem worth naming: because #548 has not merged, this PR's diff against main currently carries ~1,760 added lines (metrics.rs +548, phase_tests.rs +535, latency.rs +24, scheduler.rs +4, most of runtime.rs +104 and docs/api.md +174 are #548's). A reviewer cannot see what 560 actually changes. Land #548 first, then re-review 560 as a ~250-line diff — that alone removes most of the auto-review's "~180 duplicated lines" complaint, which is really #548's tests being reviewed twice in one diff. Within 560's own tests, four sites for one boolean (flare-cli/src/config.rs:219-234, flare/src/settings.rs:75-87, helios/src/server/config.rs:727-740, plus the CLI test) is more than the rule needs; two would do.
Simpler alternative, and why I am not pressing it
Chat already exposes the same instants in Flare's own vocabulary via return_token_timestamps → performance{ingress_ns, enqueue_ns, first_scheduled_ns} plus token_timestamps_ns (this PR adds first_scheduled_ns there, observation.rs:58-75, model-contract.md:343-356). The new value is specifically the vLLM wire shape that body-parsing gateways already read, so the object should stay minimal — and it is: six fields, no new event, no new clock read. A gateway-side patch would mean changing llama-swap for one engine, which is strictly more work than emitting the shape llama-swap already understands.
Bottom line
Worth merging with changes. Do not merge at 046aaef: the documented [server] per_request_metrics key makes ignition export, debug-serve, bench, join, and publishing fail with "unknown key," which the docs themselves invite. Add the key to ignition/cli/config.py (schema, built-in, write_initial, test row) and forward it in ignition/cli/serve.py:486, put #[non_exhaustive] on RequestTimes, either add a negation flag or document its absence, add the streamed-Responses/llama-swap caveat to docs/api.md, and get a maintainer's yes. #548 must land first; #552/#553 stay closed; #562 is judged separately on whether the streaming content instant has a consumer.
Full report · Notes Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Simplicity
Verdict: should-fix issues only Blocking:
- None. Should fix:
- helios/src/server/runtime.rs:837-844:
generate_observed+enqueueare a third and fourth admission spelling; the only caller (http.rs:336-340) unwraps oneGenerationand re-wraps it asvec![g]— callgenerate_many_observed(vec![prompt], …)instead and delete both. - helios/src/server/protocol/tests.rs:2334-2344:
metered_generationfeedsEvent::Reasoning("think")and an empty content chunk that no assertion reads (metrics_valuedepends only ontimesandgenerated = 4); the doc comment claims coverage the test lacks. - helios/src/server/runtime/phase_tests.rs:4730-4777, :4779-4850: HTTP tests re-assert encoder rules (
carriers.len() == 1,choices == [],n = 2 → null) and hand-roll ~40 lines ofserved_through_worker's plumbing; keep the option-off half,response.incompleteand instant provenance. Nits: 3 — three doc comments restating docs/api.md (encode.rs:232, :242, :248-250);carriersclones whole frames to read two fields (tests.rs:2366-2374); the[server] per_request_metricskey is a second enabling path with no Ignition schema entry (ignition/cli/config.py:21-24 rejects it; cross-lens). Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Correctness
Verdict: blocking issues
Blocking:
- ignition/cli/config.py:23-24: the documented enablement path
[server] per_request_metrics = trueis not in Ignition's closed config schema, so_validate(:108-114) rejects it and everyignitioncommand that loads the shared file (serve.py:127,174,264,431,590; bench.py:144 (not opened); publishing.py:31 (not opened),73,174,194) fails with a usage error.
Should fix:
- flare-cli/src/cli.rs:646-649, :860-863 + flare-cli/src/config.rs:73-75: a plain
boolcannot express explicit false, so[server] per_request_metrics = true, a saved Orbit group, or an exported core config can never be overridden off, contradicting docs/cli-design.md:1321-1322. - helios/src/server/runtime.rs:2272:
reserve_and_packreads the clock unconditionally per model step, while the PR body says this PR adds no clock read. - docs/api.md:1040-1043: the prose calls a permanently-null field an "unreached instant", attributes the
n > 1null to protocols that rejectn > 1(decode.rs:753), and omits the zero-token all-null shape.
Nits: 3 (Ignition debug-serve and the generated template ignore the key; stale "native Flare ignores keys" sentence at cli-design.md:1385; the vision-packing note that first_scheduled_ns is stamped after image conditioning, matching model-contract.md:349-352).
Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Architecture
Verdict: blocking issues
Blocking:
- docs/api.md:1007 / docs/cli-design.md:1317-1318,1349: the documented
[server] per_request_metricskey is outside Ignition's config schema (ignition/cli/config.py:23-24), whose strict validator rejects it (config.py:113-114), so any user who enables the option as documented breaksignition export,bench,debug-serve,joinand the publishing commands (server.py:127 (not opened),174,264,431,590; bench.py:144; publishing.py:31,73,174,194).
Should fix:
- AGENTS.md:165-169,188-193: no maintainer request, roadmap item or measured defect authorizes the feature; the only requirement cited is #551, opened by the same non-maintainer author with no maintainer reply, and the maintainer-authored issue in the area (#536) asked for Prometheus histograms, which #548 delivers.
Nits: 2 — mean_itl_ms divides first→last by generated - 1 (helios/src/server/protocol/encode.rs:266-268) instead of the recorded intervals, understating ITL on speculative cores; the branch is stacked on the still-open #548, so most of the +1757/−77 diff is #548's work.
The mechanism itself is right-sized: the worker owns every instant, the encoder owns placement (encode.rs:232-275, gated at http.rs:387-389), no clock is read in HTTP, and nothing is emitted when the option is off. The earlier findings on a private RequestTimes leaking into GenerationEvent and on flag-only configuration are both fixed at head 046aaef, and I withdraw the earlier unmeasured-cost attribution, which belongs to #548. The live 40/40 matrix, llama-swap rates and CPU numbers could not be verified here.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Subtractive
Verdict: make it smaller first The change: +1757 / −77 lines across 22 files (of which ~610 lines in helios/src/server/metrics.rs, latency.rs, scheduler.rs and docs/api.md:305-386 arrive through stacked #548) Could remove: about 200 lines, in 6 places (~165 of them this PR's own, plus ~35 shared with #548) Biggest subtractions:
- helios/src/server/runtime/phase_tests.rs:4730-4850: two new phase tests re-assert the encoder's placement and null rules already pinned at helios/src/server/protocol/tests.rs:2346-2449; replace with one ~25-line flag-on/off presence test over the existing
served_through_workerhelper: about 100 lines - flare/src/configuration.rs:34, flare/src/settings.rs:32/:76-87/:224, flare/src/controller.rs:2566, flare-cli/src/config.rs:73-75/:222-234, docs/cli-design.md:736/:1318/:1349, docs/api.md:1007: the
[server] per_request_metricsfile key is not in ignition/cli/config.py:23-24's schema, so a config.toml (not opened) with it makes every ignition command fail; drop the file key and keep the flag: about 37 lines - docs/api.md:305-386: four paragraphs walk every histogram population a third time (HELP strings at helios/src/server/metrics.rs:1548-1642 and the vLLM table at docs/api.md:475-517 already state them); ~8 lines name the groups plus the one rule the HELP strings lack: about 35 lines (shared with #548)
- helios/src/server/config.rs:734-739: strict-type rejection loop for a key whose only writer emits a literal
true(flare-cli/src/main.rs:355-356): about 12 lines - helios/src/server/protocol/encode.rs:67-72 and :232-241:
RequestMetrics::Suppressedexists only to returnSome(Value::Null)(:252-255), andenable_request_metrics(streaming)takes the value already inEncoder::streaming(:91, from decoded.stream at http.rs:375-379): about 9 lines Left behind: None. No pre-existing path becomes dead; with the option off the cost is one branch at helios/src/server/http.rs:387-389 and a#[derive(Default)]RequestRecord. Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Prose
Verdict: blocking issues Blocking:
- docs/cli-design.md:736 (also :1317-1318, :1349) and docs/api.md:1007: the documented
[server] per_request_metricskey is absent from Ignition's schema (ignition/cli/config.py:23-24), so_validate(config.py:112-114) rejects the shared config file for export, bench, debug-serve, convert, edit, combine and sign — contradicting cli-design.md:1313 and :1385-1387. Add the key (schema,_BUILT_IN,write_initial, a test) or mark it Flare-only in all four places. Should fix: - docs/api.md:1045-1050: the HTTP reference's only mention of
performance/token_timestamps_nsnever states thechoices[0]placement or thatreturn_token_timestampsrequiresreturn_token_ids(observation.rs:37-39); define it at api.md:991-992. - docs/cli-design.md:736: the default column records
[server] per_request_metrics, but only nativeflare runreads it (flare-cli/src/config.rs:57-75);flare orbit rungets the flag alone, so the documented default silently resolves to off. Nits: 3 Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Conventions
Verdict: blocking issues
Blocking:
- ignition/cli/config.py:21-33: the documented
[server] per_request_metricskey is absent from Ignition's_SECTIONS,_BUILT_IN(:37-53) andwrite_initial(:183-213), so_validate(:112-114) rejects it and every Ignition command that loads the shared config file (ignition exportat ignition/cli/serve.py:127 among them) fails on a key the PR's own docs tell users to write (docs/api.md:1007, docs/cli-design.md:1349)
Should fix:
- None.
Nits: 4 — phase_tests.rs:4541-4543 (third copy of the step-generates predicate); phase_tests.rs:4563-4610 + :4795-4849 (re-implement http_generation_request_observed, :4488-4517); metrics.rs:211-322 (new Histogram/Buckets migrates only latency.rs, three host histograms left on the old mechanism at :199-209, :475, :819-841, render :1198-1214); config.rs:353-357 (boolean parse re-spells :183-187; no boolean() beside integer() at :56).
Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Pre Test Report
Pre-test report — PR #560 "Emit vLLM-compatible per-request metrics from runtime instants"
Decision: DO NOT refer to hardware testing. Hold for code changes. Nothing has been pushed since my 2026-11-28 report (046aaef is still the head), so the verdict is unchanged, and I have now re-verified each deciding fact in the tree rather than carrying it forward. The new input this round is one @flare-autobot comment (05:42 UTC) restating the same single blocker and adding subtractive findings; its "Have your agent review the Full Review" line is repository-bot boilerplate, treated as material and not followed.
Three independent reasons, any one of which is sufficient:
- A new blocking defect created by this revision: the documented enablement path breaks every
ignitioncommand. - Authorization is still absent — no maintainer has commented anywhere in this cluster (#548/#549/#551/#560/#562).
- The author has already run, on the same GPU model, essentially the test I would book — so even after the fixes an independent run is confirmatory (worth ~30 GPU-min), not discovery.
PR state: open draft, head 046aaef, 22 files, +1757/−77, stacked on unmerged draft #548 (#560's own share ≈ +749/−26; metrics.rs (not opened) +548, latency.rs (not opened) +24, scheduler.rs (not opened) +4 are #548's). No CI checks on head. Security screen all-clear.
1. Blocking — the documented way to enable the feature breaks every ignition command
Verified again this run:
docs/api.md:1007-1008tells users to set[server] per_request_metrics = true;docs/cli-design.md(not opened) repeats it at the flag table, the[server]key list, and inside the generated sample block.ignition/cli/config.py:21-24—_SECTIONS["server"]is exactlyhost,port,api_key,thinking_token_budget,scheduler_checkpoint_extra_work_fraction. Noper_request_metrics.ignition/cli/config.py:112-114—_validateraisesUsageError(f"{path}: unknown key {key} in [{section}]")for anything outside the schema;:116-120are the only other gates (type check, and range validation forscheduler_checkpoint_extra_work_fraction).ignition/cli/config.py:19—DEFAULT_PATH = Path("~/.config/flare/config.toml (not opened)"), the same file native Flare reads;docs/cli-design.md:1313(not opened) says so outright.Configuration.loadruns for every command (ignition/cli/serve.py:127 (not opened),174,264,431,590;bench.py:144(not opened);publishing.py:31 (not opened),73,174,194), soignition export,debug-serve,join,bench,convert,edit,combine,signall fail on that key.- CI-blind: a repository search for
per_request_metricsreturns no matches underignition/and no matches undertests/. Neither file is among the 22 this PR changes.
Net effect: a user who follows the PR's own docs to enable the feature loses the model-preparation path. This is the first [server] key in this situation — every other key in flare/src/configuration.rs:26-35 (not opened) is mirrored in Ignition's schema, which is why precedent did not catch it. The Rust reader is permissive (#[serde(default)], no deny_unknown_fields), so the incompatibility is one-directional.
Fix (small, in this PR): add "per_request_metrics": bool to _SECTIONS["server"], a _BUILT_IN["server.per_request_metrics"] = False, a commented line in write_initial (~:183-213), and a positive-load row in tests/cli/test_config.py (not opened); decide separately whether ignition debug-serve forwards it (it currently forwards only the two neighbouring server keys). CPU-only.
2. Should fix before merge
(a) The flag cannot express an explicit false. enable_per_request_metrics is a plain bool (cli.rs:649 (not opened) OrbitRun, :863 Run); flare-cli/src/config.rs:73-75 fills it only if !run.enable_per_request_metrics. A search for no-enable-per-request returns no matches, so there is no negating flag. Consequences: a config file that enables the option can never be overridden off for one run (contradicting docs/cli-design.md:1321-1322 (not opened)), and a saved persistent Orbit group that captured the flag has no exit short of editing orbit.toml (not opened). Repo precedent pairs negatives for exactly this reason (--history-drafts/--no-history-drafts). Fix: tri-state Option<bool> or an overrides_with pair.
(b) A printed-core config can override the operator's file. flare-cli/src/main.rs:355-356 writes config["per_request_metrics"] = true only when the flag is true, while flare/src/controller.rs:2566 (not opened) always writes it from settings. So a core whose exported server config declares per_request_metrics: true (parsed at helios/src/server/config.rs:353-357 (not opened)) stays on under flare run even when the operator's file says false. Latent today only because of §1.
(c) mean_itl_ms is not exactly vLLM's, and the evidence claims it is. encode.rs:266-268 divides first→last by generated - 1. On speculative cores a step commits several tokens sharing one completion instant (docs/api.md:1025-1026 says so), so the true interval count is smaller and the mean is understated. The doc is consistent with the code (api.md:1022) — the problem is the parity claim in the description/evidence, which asserts equality with vLLM's definition. The exact count already exists as RequestRecord.tokens_committed. Fix: either carry the interval count in RequestTimes, or narrow the parity claim in docs and description.
(d) Closes #551 overstates delivery; a test would report the gap as a failure. llama-swap reads only an event's top-level metrics. Chat/Completions get it only when the client sends stream_options.include_usage (documented at api.md:1031-1038 — handled), and streamed Responses get nothing, because encode.rs:731-743 nests the object inside response — which the author's own live table reports. That second gap is undocumented and belongs beside the include_usage caveat.
(e) Minor doc accuracy. api.md:1040-1041 calls every null "an instant the request did not reach" although time_to_first_content_token_ms is permanently null (encode.rs:263, and the table at :1020 says "Always null"); api.md:1042 states the n > 1 null generally although decode.rs:753-754 (not opened) rejects n != 1 for every protocol except Completions, so only Completions can reach it; the zero-token all-null shape is undocumented.
(f) One-line API hygiene. RequestTimes is now correctly re-exported, but it sits inside the public GenerationEvent::Finished with no #[non_exhaustive]; with the in-process Rust SDK on the roadmap, add it now.
3. Corrections to supplied findings (so they are not re-litigated)
- "
flare orbit runignores the[server]key" is only partly true. Orbit's own process does not read it, but the flag is forwarded to rank zero'sflare run, which does runConfiguration::apply(flare-cli/src/config.rs:57-58); on a single-host run rank zero reads the sameconfig.toml(not opened). The doc row is wrong only for a paired rank zero using a different file — a doc nit, not a should-fix. - "The per-step clock read contradicts the PR body" — withdrawn:
runtime.rs:2272(not opened) belongs to #548's commit, and the description now attributes it correctly. - "Public
RequestTimesleak" — fixed: exported besideSnapshot. - "
Timing.streaming/ unreachablerecord_commitguard", "seven-armmatches!vsGraphKind::samples()" — fixed. - "Source comment says it does not report the content instant" (
encode.rs:248-250) — stale: that comment was rewritten; at this head it says "Flare does not report the content instant."
4. Expected value of a hardware run now
Low. The cheap behaviour is already pinned without a GPU (encoder placement/null/arithmetic with exact expected milliseconds at protocol/tests.rs:2346-2449 (not opened), plus worker-driven step-loop tests at phase_tests.rs:4690-4850 (not opened) that assert each instant falls inside the step that produced it). And the author has already run the GPU test on the exact GPU model cn5 carries — one RTX PRO 6000 Blackwell, the prepared local-inference-lab/Qwen3.8-Flash-Next-FLARE gb202 package behind llama-swap v250, enabled through the [server] key: 40/40 request-matrix checks, tokens_per_second/mean_itl_ms reconciling, first_scheduled_ns between enqueue_ns and the first token stamp, llama-swap showing Chat/Completions rates, and no measurable CPU overhead (15.4–15.9 s on vs 16.0–16.3 s off over 16×512-token runs). An independent run would be confirmatory: reproducibility from a build we control (this PR + #548 only), real mean_itl behaviour on speculative cores, and confirmation of the two consumer gaps.
Note that the author's evidence image carried main + #548 + #549 + #560, so it is not a test of this PR alone — a point in favour of one clean run later, and not in favour of a run now.
5. Minimal test plan (execute only after §1–2 land)
One GPU, one host. Nothing here touches TP>1, multi-host, KV pages, prefix cache, vision, or Windows.
Phase 0 — CPU, ~15 min, before booking. Head has no CI: cargo check --features server (helios), cargo check (flare-cli, flare), cargo test --features runtime-core,server --lib -- server::, the flare-cli config/cli tests, and verification/helios-lifecycle/check.py (not opened). Then the regression test for §1: ignition export with the documented [server] per_request_metrics = true line present. One unrelated template test needs FLARE_TEST_TEMPLATE_DIR.
Phase 1 — GPU, cn5, one gb202 TP1 core, one server per option state (~20 min).
- Chat JSON → top-level
metrics, six keys, content instant null. - Chat stream with
stream_options.include_usage→ exactly one carrier frame,choices == [], values populated. - Chat stream without
include_usage→ key absent (assert it; the #551 gap made explicit). - Completions
n = 2+include_usage→"metrics": null. - Completions with two prompts → key omitted.
- Responses stream,
max_output_tokens = 1→response.incompletecarriesmetricsinsideresponse. - Messages, body and stream → never carries it.
- Single-token Chat →
mean_itl_msnull,generation_time_ms0. - Option-off repeats of 1 and 2 → no
metricsanywhere;performance.first_scheduled_nsonly withreturn_token_timestamps. - In-script arithmetic: all fields non-negative,
ttft ≤ generation + queue,tokens_per_second == generated/(last − scheduled), and on a speculative core check whethermean_itl_msdiffers fromgeneration/(n−1)— the empirical face of §2(c).
Phase 2 — ~10 min, highest value per minute. llama-swap v250 in front of the branch: streamed Chat/Completions with include_usage → real (non--1) prompt and generation rates; streamed Responses → confirm the absence, so the documented limitation is verified rather than assumed. This is the only end-to-end evidence from a build we control.
Deliberately not tested: GPU throughput A/B for the flag (no performance claim; off-path work is one branch plus a ~17-byte struct copy, and the author's CPU overhead was already unmeasurable); TP>1/multi-host; KV/prefix cache; vision; Windows/WinUI (the desktop concern was config plumbing, resolved in code).
Resource notes. cn5 is the right host — 1 of its 4 RTX PRO 6000 Blackwells, the model the author validated on. cn7/GB10 adds nothing: nothing in the diff is arch-specific, and the desktop/config path is a code question, not a hardware one. Cost driver to check before booking: flare run needs a prepared/exported core and does not accept a recipe alias; neither host caches a -FLARE core (their lists are recipe checkpoints), so confirm a published gb202 TP1 -FLARE core is downloadable or budget ignition export GPU time. That preparation, not the test, dominates the cost — and it is why the answer to "is it worth it" must be settled before any booking.
6. What turns this into "refer to testing"
ignition/cli/config.pyaccepts the key, with a positive-load test — blocking.- The flag can express an explicit false (or the limitation documented beside it), and
main.rsstops letting a printed core override the operator's file. mean_itl_mscounts real inter-token intervals, or the vLLM-parity claim is narrowed.- The streamed-Responses / llama-swap nesting caveat added to
docs/api.md, plus the three doc-accuracy fixes in §2(e). - #548 merged and the branch rebased, so the diff under review is #560's own (~+749/−26).
- A maintainer confirms per-request vLLM-shaped response metrics are wanted. If the answer is no, no hardware time should be spent at all — this is the single highest-leverage unblock, and it costs one comment.
code review summary
Recommendation: Changes Requested
The mechanism is right-sized and correct — the worker owns the instants, the encoder owns placement, nothing is emitted when the option is off — but the documented [server] per_request_metrics key is outside Ignition's config schema, which breaks every Ignition command, and about 180 lines (most in one test file) duplicate rules and plumbing already pinned elsewhere.
- Blockers: 1
- Should fix: 6
- Subtractive suggestions: 6
- Nits: 5
Full report · Notes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.
Apply Labels
Applied: +triage:review, +enhancement, +area:api
Classification Confidence
Threshold: 65%
Triage
- [✓]
triage:review: 93.7% -
triage:design-review: 6.0% -
triage:validation: 0.2%
Priority
-
none: 100.0% -
priority:P1: 0.0% -
priority:P2: 0.0%
Type
- [✓]
enhancement: 99.2% -
duplicate: 32.1% -
community: 24.5% -
performance: 8.5%
Area
- [✓]
area:api: 98.6% -
area:scheduling: 32.1% -
area:selene: 24.5% -
area:orbit: 20.2%
Model
-
model:mimo-v2.6: 0.7% -
model:nemotron-3.5-bolt: 0.6% -
model:muse-glimmer: 0.3% -
model:inkling-small: 0.2% decide malicious: all_clear (100%): No malicious content found
explore
Author: WynnD (outside contributor, GitHub association NONE, 0 merged PRs; Discord oystersmiles)
Motivation: Clients and gateways such as llama-swap can only show prompt and decode rates if each response carries per-request timings, and Flare's /metrics endpoint aggregates instead. This PR adds, opt-in, vLLM's metrics object built from instants the model worker already records.
Scale: +2000 / −161 lines in 25 files (head e3829e62; the published diff also contains all of stacked #548)
Proposal:
- Add vLLM's six-field
metricsobject to Chat, Completions and Responses output from worker-recorded instants, not HTTP-layer clocks. - Place it at the top level of JSON bodies, on the final Chat/Completions usage chunk, and inside
responseof Responses terminal events. - Enable via
--enable-per-request-metricsor[server] per_request_metrics(flare run, Orbit rank zero, desktop controller,ignition debug-serve). time_to_first_content_token_msis always null; the implementation was split to #562, which was then closed.- Suppress the object for
n > 1, multi-prompt Completions, and Anthropic Messages. Touches: helios/src/server/metrics.rs(not opened),helios/src/server/runtime.rs(request instants, requeue semantics)helios/src/server/protocol/encode.rs,helios/src/server/http.rs(placement, gating, arithmetic)flare-cli/,flare/,ignition/cli/configuration plumbing and docs Related items:- #548 Add per-request histograms and vLLM-parity request metrics (open): required base, supplies
RequestTimes - #551 Report per-request timings on final responses (open): issue this claims to close, but its own text asks for Responses top-level placement, Messages and draft counts that #560 omits
- #562 Report the first content token of per-request metrics in streams (closed): content TTFT now unowned
- #549 Report KV pages held by active requests (open): sibling metrics PR
- #552 / #553 (closed): superseded predecessors
Link: https://github.com/NVIDIA/hyperflare-inference/pull/560
Autobot comments: Amendment highlights — the only blocker from the 05:42 auto-review (Ignition rejecting the documented
[server] per_request_metricskey) is fixed at head (config.py:24, :41, :194; serve.py:488), and the 06:19 review is a verbatim duplicate of 05:42, so no review of the current tree exists.Closes #551overstates: the object is nested insideresponsewhereas #551 asks for it beside it, Messages is excluded, and its draft counts are absent. Newly material: project owner Luke Alonso made the TLA+ lifecycle check plus--releasetests blocking on #548/#549, and the requeuefirst_scheduled_nsreset he asked for is still missing from the code this PR carries (runtime.rs:2647-2675), which feeds this PR's queue-time, TTFT and throughput fields.
Classify intake
Selected: triage:review, enhancement, area:api
Threshold: 65%
Triage
- [✓]
triage:review: 98.2% -
triage:design-review: 1.1% -
triage:validation: 0.3% -
none: 0.2% -
triage:investigate: 0.1% -
triage:partial: 0.1% -
triage:integration: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Priority
-
none: 99.8% -
priority:P2: 0.1% -
priority:P1: 0.1%
Type
- [✓]
enhancement: 98.4% -
duplicate: 34.9% -
community: 20.2% -
bug: 1.4% -
performance: 0.2% -
documentation: 0.0%
Area
- [✓]
area:api: 99.8% -
area:preparation: 14.8% -
area:scheduling: 4.2% -
area:orbit: 2.0% -
area:kernels: 1.2% -
area:selene: 1.1% -
area:caching: 0.5% -
area:engram: 0.3% -
area:rocenante: 0.1% -
area:memory: 0.0% -
area:packaging: 0.0%
Model
-
model:kimi-k3.1: 0.8% -
model:qwen3.8-flash-next: 0.2% -
model:gemma4: 0.1% -
model:glm-5.3: 0.1% -
model:inkling-small: 0.1% -
model:muse-glimmer: 0.0% -
model:deepseek-v4: 0.0% -
model:nemotron-3.5-bolt: 0.0% -
model:deepseek-v4.1: 0.0% -
model:qwen3.8-27b: 0.0% -
model:mimo-v2.6: 0.0%
Apply Labels (Intake)
No label changes
Value Proposition
Value Proposition — PR #560, "Emit vLLM-compatible per-request metrics from runtime instants"
Charter alignment — right layer, one rule broken. The work lives in Helios (placement, gating, arithmetic) rather than in Ignition recipes, adds no per-model branch or hardware path, and the flag is documented and test-pinned on both entry points (docs/cli-design.md:736, :1318; flare-cli/src/cli.rs:1379-1400). That respects "keep the runtime small and model-agnostic" and the explicit-flags line. It conflicts with #417: with the option on, a Chat/Completions stream without stream_options.include_usage is accepted and emits nothing (encode.rs:236), admitted in prose at docs/api.md:1022-1029. Documenting a silent omission is not implementing or rejecting the field; vLLM's force-include-usage is the spec-faithful route and Flare has none. There is also no maintainer request behind this: issue #551 was opened by the same author with zero comments, and the only human maintainer activity in the cluster is Luke Alonso's blockers on #548/#549.
Novelty & status — genuinely additive. Nothing on main exposes per-request rates, and the predecessors (#552 llama.cpp timings, #553 HTTP-layer timing) were closed as superseded by this approach. Not obsolete, not superseded.
Value vs cost — real beneficiary, thin independent evidence. llama-swap already reads vLLM's object, so gateway integration is free. The 40/40 live matrix and the CPU bound (option on 15.4–15.9 s vs off 16.0–16.3 s over 16 concurrent streams) are decent author evidence, but no CI status is visible and multi-GPU cores and Windows were not run. Cost: +2000/−161 across 25 files, config plumbing through four crates plus the desktop controller, and the published diff carries all of #548 with none of the dependency expressed.
Blocking gaps. (1) docs/design-review.md Layer 3 requires the TLA+ lifecycle check plus --release tests when RequestScheduler, Worker, or phase_tests.rs change — all three do; neither was run, the same omission Luke Alonso called blocking on #548/#549. (2) His requeue defect is carried verbatim: Worker::requeue (runtime.rs:2647-2675) does not clear record.times, so a pre-prefill requeued request keeps a stale first_scheduled_ns feeding precisely this PR's queue_time_ms, time_to_first_token_ms, and tokens_per_second. (3) Closes #551 overstates delivery three ways — nested inside response vs beside it, Messages excluded, draft counts gone — so the maintainer's Part of rule applies. (4) time_to_first_content_token_ms ships permanently null after #562 was closed, and the description still claims performance.first_scheduled_ns as this PR's work when it ships with #548.
Verdict: Worth it with changes. Merge after #548 with the owner's blockers cleared (including the requeue reset), lifecycle + --release evidence, an #417-faithful path for usage-less streams, Closes #551 → Part of #551, and a test pinning the new template line.
Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.