Value proposition scratchpad · NVIDIA/hyperflare-inference #573

Raw Markdown for agents: https://autobot.eidonix.com/p/c77afca6-83e7-4665-a203-55d2fc0bc25f.md

#1 [high] PR #573 shape: files, design, size

PR #573 (open, lukealonso) "helios: tolerate omitted closing tags on complete tagged tool calls at EOS". 9 files, +1423/-69.

#2 [high] Prior art / conflicting PR #514

#514 (open, jannerchang, 2026-11-25) "helios: allow lenient EOS close for GLM argument-tag tool calls": +61/-0, adds const LENIENT_EOS_CLOSE: bool to ToolDialect, true only for GLM, and calls D::parse(&raw, tools) at EOS if valid. Touches the same 2 files (argument_tags.rs, tagged.rs). Auto-review on 2026-11-25 11:45: "Review Stopped ... It is low value or does not align with the project charter." #573 is the same idea, flag-free and much broader, but its description never mentions #514 or claims to supersede it; both open on the same files (merge/effort duplication).

#3 [high] Evidence gap: no live/model reproduction; contrary evidence in #133

#573 evidence = hand-built strings from chat templates at every split point; lib tests (203 passed / 4 ignored grammar), protocol/logprobs tests across glm/qwen/mimo/gemma/minimax x Chat/Messages/Responses. No captured model stream, no live serving on any GPU, no frequency measurement. Limitation section itself lists tokenizer/grammar/checkpoint-gated tests and live GPU runs as not executed. Contrary field evidence: issue #133 (closed) observed "incomplete GLM tool call" and other GLM argument-tag rejections on a live TP2 deployment; follow-up traced them to corrupted prepared graphs (fixed by #129), and after re-export: tool parse rejections 1/84 -> 0/84, 84/84 HTTP 200, "zero parser strings in the server log". original-el8 (2026-11-05): "Malformed tool calls from otherwise valid model output remain a separate parser/API concern"; "the GLM tool parser itself is strict and unchanged ... that documented behavior did not need to change." Also noted the deliberate asymmetry: open <tool_call> at EOS errors, same open call at max_tokens is dropped (docs/api.md, tagged.rs:251-263 on main), pinned by test output_limits_allow_incomplete_tools_but_eos_rejects_them (03074c11), restated in #67. Supporting precedent for leniency: #67 (merged) measured Qwen3.8 Flash ending its turn where a literal </tool_call> would follow (7 of 20 logprob requests; one-token continuation gives <|im_end|> ~0.97 vs </tool_call> ~0.02), and already accepted prose-complete calls as calls like vLLM/SGLang.

#4 [high] Scope/consistency gaps and contract change

Behavior changes beyond "at EOS": chatml parse_candidate and minimax parse_candidate now accept a body closed by </tool_call> without </function>/</invoke> on the ordinary streaming path (previously Err mid-stream). Documented in docs/api.md new paragraph. Coverage asymmetry left in place: DeepSeek DSML (dsml.rs:380 "incomplete DeepSeek tool call at end of response"), TML/XTML/recipient parsers get no EOS leniency, so the same model habit on those recipes still errors. docs/api.md only implies this ("DSML and XTML are parsed by their own parsers rather than this path") and the new paragraph does not say they keep failing. Policy: docs/api.md on main stated "recognized but incomplete calls at natural completion are errors" (deliberate, from 99cfcd5be per #133). #573 rewrites that sentence -> documented contract change, arguably needs maintainer sign-off. Minor: PlainText gets a stub parse_eos returning the same error; a defaulted trait method returning Err would be smaller. self.calls += in TaggedOutput::finish is defensive only (nothing reads self.calls after finish; TaggedTools carries its own index). outer_closed is a genuine small bug fix (outer_tool_pending was set even when D::CLOSE had been consumed, e.g. MiniMax/Qwen calls closed by </tool_call>, which can silently swallow a following </tool_call>-prefixed content text). "Discord: no username provided" is a process nit.

#5 [high] Technical review of #573 guardrails

Verified guardrails in helios/src/output/tagged.rs: confirmed is set from D::starts_call(...) == Some(true) (tagged.rs:715-724) or true for OutputStart::ToolBody (tagged.rs:428-433); during finish an undecided opener still promotes to Mode::Tool but with confirmed=false, so TaggedTools::finish (tagged.rs:313-320) rejects it -> old anti-fabrication property preserved. in_json_string also rejects. Non-EOS causes early-return empty (tagged.rs:302-312). All 5 ToolDialect impls updated (grep: only argument_tags:97, chatml:17, gemma_call:138, minimax_xml:190, pipeline:41) so the new required method breaks no third impl; downstream flare/flare-cli only need compile. Residual risk found: Gemma/MiniMax use the trait default starts_call = Some(true) (tagged.rs:48-50), so prose mentions are always "confirmed"; an unclosed but brace-balanced Gemma example in prose that previously errored at EOS now becomes an executed call. Same class #67 already accepts for closed examples (11 of 32 mention requests wrote complete example calls), but the PR does not test/document this broadening. No per-token cost added: only two bool writes per token; parse_eos runs once at EOS. self.calls += in TaggedOutput::finish (tagged.rs:522-529) is unreachable-after-finish bookkeeping (nothing reads self.calls afterwards; TaggedTools carries its own index) = optional. outer_closed fix (tagged.rs:593-596) is a genuine defect fix: previously outer_tool_pending was set even when D::CLOSE had been consumed, which could swallow a following duplicate </tool_call>; now such text is emitted as content (untested edge).

#6 [high] Verdict and charter mapping

Charter (read_charter): vision = fast local NVIDIA inference for "long conversations, coding agents, heavy tool use", users behind OpenAI/Anthropic SDK clients; focused research prototype, not general production. "Solve the right problem in the right place"/smallest footprint. "Bring real evidence": perf needs benchmarks, bug fixes need root cause rather than swallowing errors; "hypothetical users aren't enough". "Keep the runtime small and model-agnostic ... shouldn't accumulate per-model branches", "No per-model special cases or flags" (explicit review standard) — #573 complies (dialect method, no flag; contrast #514's LENIENT_EOS_CLOSE). "What gets merged: PRs that address a maintainer request, a roadmap item, a reproducible bug, a measured perf/memory issue, or bad docs." "Respect contributors": priority contributors @voipmonitor, @original-el8, @lukealonso carry extra weight, never close out of hand. Review standard "Supported matrix & compatibility": check interactions across every supported model. Verdict decided: worth it with changes. Reasons: right layer, flag-free, verified anti-fabrication guardrails, targets a core-vision workflow (heavy tool use through SDK clients), converts hard user-visible failures into correct calls. Costs: ~170 net production lines over 6 files, one new mandatory trait method, one deliberate documented-contract reversal (docs/api.md "recognized but incomplete calls at natural completion are errors" from 99cfcd5be, restated in #67/#133), and a new asymmetry (DeepSeek DSML dsml.rs:379-380, XTML, TML still error at EOS). Required changes: (1) cite/supersede #514 same-goal open PR; (2) one captured real token stream that fails today and succeeds after, for GLM + a function-tag model, else label this a maintainer policy change needing explicit sign-off; (3) document + pin the DSML/XTML/TML asymmetry in docs/api.md; (4) shrink footprint: default parse_eos to Err (drop pipeline.rs stub), reuse parse() where structural checks already exist (Gemma), drop the no-op self.calls += while keeping the outer_closed fix; (5) add tests for the Gemma/MiniMax prose-mention broadening and the duplicate-close-tag behavior change.