Architecture report · NVIDIA/hyperflare-inference #573

Raw Markdown for agents: https://autobot.eidonix.com/p/29f63e1c-0285-466f-9650-d9e274dd9ac6.md

Review: PR #573 — helios: tolerate omitted closing tags on complete tagged tool calls at EOS

Lens: architecture and scope (does this belong in the repo, is the approach right), judged against the charter, AGENTS.md and docs/design-review.md.

Key findings

Detail

1. Should fix — four dialects are relaxed on assertion, not on evidence

docs/api.md:447-451 (the new spec text) applies the relaxation to "tagged tool parsers" generally, and the PR description states the omissions as fact: "GLM omitting </tool_call> after </arg_value>, Qwen/MiMo omitting </function></tool_call> after </parameter>, Gemma 4 omitting <tool_call|> after }, or MiniMax XML omitting </invoke></tool_call> after a closed parameter element."

Nothing in the PR description backs those four statements with a model, a checkpoint, a captured generation, or a reproduction command that identifies inputs and configuration. The Evidence section enumerates unit and protocol tests written for the new behaviour — those show the code does what the author decided, not that the models behave that way. The only linked request is #514 ("helios: allow lenient EOS close for GLM argument-tag tool calls"), which is GLM-only and which auto-review assessed as "low value or does not align with the project charter".

Why it matters: the charter's Bring real evidence rule says bug fixes need the root cause and that "hypothetical users aren't enough to justify a change"; What gets merged lists "a reproducible bug". AGENTS.md:103-112 requires each material claim to be connected to the behaviour tested, baseline, configuration, result and limits, and docs/design-review.md:106-115 (principle 12) requires honest evidence and disclosure of unrun checks. The PR does disclose its unrun checks honestly, but the underlying premise — that four model families omit their closers — is unverified in the text. The burden is higher than usual here because the repository already declined a narrower version of this same change (#514), so "we now do it for four dialects" reverses a prior scope decision without adding any evidence.

Fix: attach one captured generation per dialect (prompt + model/checkpoint + observed unclosed output, or an issue link containing it), or narrow the change to the dialect(s) with a demonstrated defect and leave the rest erroring as today. docs/api.md should then describe exactly the dialects covered, not "tagged tool parsers".

Note: #514 also proposed a const LENIENT_EOS_CLOSE: bool per-dialect flag, which would have violated docs/design-review.md:58-61. This PR's single parse_eos method is the right way to express the same capability without a policy flag, so the approach is fine — only the claimed motivation needs evidence.

2. Nit — parse_eos has no default on the public trait

helios/src/output/tagged.rs:43-45:

/// Parse an unclosed call body at natural end-of-sequence (`Termination::Eos`).
/// Accepts only structurally complete, self-delimited, non-strict calls.
fn parse_eos(body: &str, tools: &[Value]) -> Result<Vec<(String, String)>>;

pub trait ToolDialect lives in pub mod tagged (helios/src/output.rs:23), re-exported from the server feature of the helios crate (helios/src/lib.rs:20-21), so every implementor inside and outside the crate must now write this method. The conservative behaviour is expressible from existing trait items, e.g. Err(format!("incomplete {} tool call", Self::NAME).into()) — the identical string TaggedTools::finish already produces at helios/src/output/tagged.rs:317-318, and exactly what PlainText duplicates at helios/src/output/pipeline.rs:49-51 (it repeats its parse error, "tool parsing is not configured").

Why it matters: a default keeps the trait's "safe unless you opt into recovery" shape explicit in the type system rather than in five bodies, and deletes the duplicated impl. Low severity — the charter's roadmap says the crates are not yet published (Roadmap → In-process Rust SDK (#6)), so there is no live external-implementor break today. Fix: add a default body returning incomplete <NAME> tool call and drop PlainText::parse_eos.

3. Nit — documentation over-generalises which parsers recover

The new text at docs/api.md:447-451 states the natural-completion recovery as a property of "tagged tool parsers". Only four dialects implement it: helios/src/output/argument_tags.rs:109, helios/src/output/chatml.rs:30, helios/src/output/gemma_call.rs:147, helios/src/output/minimax_xml.rs:203 (plus the erroring PlainText at pipeline.rs:49). The other tagged/structured parsers — dsml.rs:364-383, xtml.rs:234-250, tml.rs:358-374 (not opened), recipient.rs:264-291 (not opened) — remain strict at EOS. Leaving them alone is correct scope discipline (they are separate state machines with their own contracts), but the doc sentence should name the four dialects or say "the argument-tag, function-tag, Gemma call, and MiniMax XML parsers", so a later reader does not treat the omission as a bug in DSML/XTML/TML/recipient.

4. Positive assessment — layering, flags and preserved guarantees

Open questions / not verified