Value proposition report · NVIDIA/hyperflare-inference #514

Raw Markdown for agents: https://autobot.eidonix.com/p/dfe167bb-db46-46d3-bb69-71bd4d1f967c.md

Verdict: Not worth it (would need a maintainer policy decision and a rewrite before any merge)

The stated problem is real in principle — GLM can emit a complete argument-tag call and then hit EOS without </tool_call> — but this PR is the wrong fix, in the wrong layer, and it breaks a deliberately pinned behavior.

1. It breaks an existing test, and fabricates a tool call from prose

The load-bearing finding. glm_prose_may_mention_the_tool_call_tag (helios/src/grammar/strict.rs:3594-3721) builds a GLM OutputConfig with tools weather and lookup (:3613-3616) and then calls compile_presented_strict_tools(..., Some(&mut out_cfg.content)) (:3637-3639). That function mutates the presentation config: function["strict"] = Value::Bool(true) for every tool with a strict schema (strict.rs:1441-1449). Both tools have strict schemas.

It then asserts assert_unfinished_at_eos(&out_cfg, "Avoid <tool_call>weather") (:3669, helper at :3343-3348, i.e. finish(Eos) must be Err). Trace under this PR:

So the model's answer text "Avoid <tool_call>weather" becomes a synthesized zero-argument weather tool call that the model never made, discarding the prose. That parse returns {} for a bare name is not speculative — the existing test at argument_tags.rs:170-201 asserts exactly calls[1]["function"]["arguments"] == "{}". The client then gets finish_reason: "tool_calls" (encode.rs:622-628) and executes a tool nobody asked for. This is precisely the "never fabricate calls" property that chatml::tests::terminal_cause_preserves_incomplete_call_errors_and_never_fabricates_calls (chatml.rs:855-887) guards for the sibling dialect.

Why the PR's verification missed it: the claimed command filters to -- output::argument_tags:: output::chatml::, which excludes grammar::strict::tests even though grammar is enabled transitively by server (helios/Cargo.toml:25). The posted "24 passed" is true but does not cover the affected area, so the PR description's evidence does not support the merge claim under the charter's "bring real evidence" rule.

2. It reverses a deliberate, documented, maintainer-level decision

3. It conflicts with the charter's architectural rule

The charter's Code Review Standards say: "No per-model special cases or flags: Keep shared runtime layers general rather than adding model-specific branches or flags." const LENIENT_EOS_CLOSE is a per-dialect policy flag on the shared ToolDialect trait, set true only for GLM (argument_tags.rs:29). Unlike the existing trait consts (OPEN, CLOSE, FUNCTION, TRIM_NEWLINES, TOOL_ENDS_REASONING), which all describe model syntax, this one describes error policy. The result is that byte-identical malformed output yields finish_reason: "tool_calls" on GLM and a terminal stream error on Qwen, DSML, and XTML — a model-dependent API contract, undocumented. That is the "good idea in the wrong place" the charter declines (#404).

4. Who benefits, how much, and the evidence

Little, and it is unquantified.

5. Cost

Small in lines (~60) and zero in steady-state performance (finish-path only, no decode/grammar cost). But the maintenance and risk cost is disproportionate: a new cross-cutting policy axis on the shared trait, a divergence in API semantics across dialects, docs that now lie, and one broken strict-mode test plus whatever else the author's narrower filter did not run. The self.calls index is also not advanced by the new branch (tagged.rs:304-329 vs the push path at :269-292), which is latent-index-fragile even though it is currently masked by GLM's single-call-per-<tool_call> shape.

6. Simpler ways to the same end

  1. If this is a real defect, fix the root cause where the data is: capture the failing GLM output and show the frequency on a clean export (post-#129). #133's evidence suggests the observed truncation was the corrupt graph, not the model.
  2. If the model genuinely truncates, fix it at generation, not presentation: the closing tag is in the template/grammar domain (Ignition recipe or strict wire grammar). That is model-agnostic and needs no runtime flag.
  3. If it truly must be presentation-level leniency, make it general and documented: apply it to all dialects, gate it on an explicit request/server option, update docs/api.md:444, and — critically — require that a bare or empty-body envelope with no <arg_key> is rejected, so prose and bare function names can never become {} calls. That last constraint alone would fix the regression in §1 without touching the rest.

What would change the verdict

As written, this PR duplicates an intentional behavior, violates the no-per-model-flags standard, contradicts docs/api.md, and introduces a silent tool-call-fabrication path. Not worth merging. If a priority contributor asks for it, the review to send is: rebase the leniency into a general, documented mechanism, reject empty-body envelopes, and run the full runtime-core,server library suite including grammar::strict::tests.