Explore scratchpad · NVIDIA/hyperflare-inference #677

Raw Markdown for agents: https://autobot.eidonix.com/p/e87996f1-65c7-4f0b-8589-f961a50629b0.md

#1 [high] Change: what PR #677 does, file map, size

PR #677 (open, head f439f74, base main@1fbcc3c9), "fix(helios): preserve Chat Completions reasoning aliases, normalize effort levels, and allow literal closing tool tags in argument values". Author brandonmmusic-max (CONTRIBUTOR). No comments, no reviews, no CI checks on head. 6 files, +791/-59.

Files (pr_files):

Two independent changes bundled: (A) decode.rs chat_messages: reads first non-null of reasoning_content, thinking, reasoning (decode.rs ~line 181-195); non-string now errors with field name in message (e.g. "thinking must be text"), i.e. HTTP 400 for non-string thinking/reasoning on Chat messages (previously those fields were ignored entirely, so a numeric reasoning was silently dropped). (B) decode.rs options(): Chat protocol now treats top-level reasoning_effort string as effort; "none"->enable_thinking:false, "minimal"->Effort::Minimal, "medium"->Effort::High, and when normalized (or nested reasoning.effort used) skips copying raw reasoning_effort into options.template (~line 681-690). Unknown string values on Chat now fall through to None instead of error (arm _ if protocol == Protocol::Chat && !chat_nested_effort => None), but unknown non-string values (numbers) still error. Nested reasoning.effort accepted on Chat when top-level absent/null. (C) output/: ToolDialect::parse_candidate return type changed from Result<Option<Vec<(String,String)>>> to Result<Candidate> where Candidate = Complete | InJsonString | IncompleteValue. TaggedTools::push only sets in_json_string on InJsonString; on IncompleteValue it just continues scanning past the inner closer. ArgumentTags/parse_tool_candidate(chatml)/GemmaCall return IncompleteValue for open non-JSON argument values during streaming candidate evaluation; direct parse/parse_eos still error. MiniMaxXml maps to Candidate::Complete (its outer closer starts with NAMESPACE sentinel). Tests added: argument_tags.rs (+~155 lines test), chatml.rs (both ChatMlOutput and CompactChatMlOutput), gemma_call.rs, minimax_xml.rs, decode.rs native_prompt_tests (2 tests). Diff spans: pr_diff start=0..~49371 chars.

#2 [high] The change: decode.rs effort/reasoning detail and docs gap

Decode-side detail (verified in code, PR head f439f74 vs main 1fbcc3c9):

#3 [high] The change: output/ Candidate three-state and untouched files

Verified at PR head:

#4 [high] The change: undeclared behavior deltas (TMLv0 effort, high passthrough)

Verified behavior deltas not stated in the PR description (all at head f439f74):

  1. Chat reasoning_effort": "medium" on a TMLv0 native encoder (Inkling 2 / TML models) changes rendered effort from 0.7 to 0.9. TMLv0's named table is ("medium", 0.7), ("high", 0.9) (helios/src/frontend/tml.rs:18-29); previously the raw string reached the template through options.template and tml::effort mapped it to 0.7 (frontend/tml.rs:49-69). Now decode.rs:621-624 maps medium -> Effort::High and withholds the raw string, and request.rs:518-527 resolves High to the first template-accepted candidate ["high","medium"], i.e. high -> 0.9. The description discloses the fallback only for "Jinja templates distinguishing medium from high" (compat note b); the TMLv0/native-encoder 0.7→0.9 change is not mentioned. (deepseek/DeepSeek V4+V41 previously rejected medium outright, frontend/deepseek.rs:191-219, so there it changes 400→200, which is disclosed.)
  2. Unknown string reasoning_effort on Chat is now silently ignored instead of forwarded to the template: arm _ if protocol == Protocol::Chat && !chat_nested_effort => None (decode.rs:627), and because normalized_chat_effort stays false the raw value is still copied to the template only if... no: the copy loop is skipped only when normalized/nested, so an unknown string IS still copied (decode.rs:684 condition false). Re-reading: for unknown strings, native is None, normalized_chat_effort false, so the key loop still inserts it — passthrough preserved, matching the description's "unknown strings ... preserved". But an unknown nested reasoning.effort string errors (decode.rs:627-628 because chat_nested_effort is true), and unknown numeric top-level values keep flowing to the encoder (numbers are filtered out by .filter(|v| v.is_string()) at line 601, so they never reach the match). Description's claim holds; the asymmetry (string vs number) is worth noting.
  3. reasoning_effort: "high" on Chat is still copied raw (normalized_chat_effort false), so templates that reject high still 400 — e.g. Qwen3.8's pinned template raises "Unexpected reasoning effort high. Supported types are xhigh (default), medium, and low." (tests/frontend/qwen38.json:3089-3099). The PR fixes medium for such a template but leaves high broken. Not disclosed.
  4. Non-string thinking/reasoning in a Chat message now 400 where it was previously ignored (decode.rs:184-195; main decode.rs:184-190). Disclosed as compat note (a); affects clients that echo Anthropic-style {"type":"thinking", ...} objects into Chat messages.

#5 [high] Why/Related: #172, #25 and docs describe the behavior this changes

#6 [high] Community/Process: no engagement, no CI, no docs, bundled fixes

#7 [high] Related work: #670 collision risk, #596/#573/#67/#418 lineage, #133

Overlapping/related work on the same files (items_touching + read_item):

#9 [high] Project fit: charter and AGENTS.md mapping for #677

Charter (read_charter) mapping, as facts:

#10 [high] Claims and evidence: test coverage confirmed, live benchmarks unlinked

Claims vs evidence in the PR description, checked against the tree: Supported by in-tree tests (I read the code, not ran it):

#11 [high] Research summary

Case file prepared for PR #677 (brandonmmusic-max, open, head f439f74, base main@1fbcc3c9, 6 files, +791/−59). Findings are in ten scratchpad entries covering all requested angles; the facts a reader could not get from the description are summarized here.

Undeclared behaviour deltas. Chat reasoning_effort: "medium" now maps to Effort::High through options.effort and is withheld from the template (decode.rs:621-628, 684-686), so on TMLv0 native encoders (Inkling 2) the rendered effort goes 0.7 → 0.9 (frontend/tml.rs:18-29 vs request.rs:518-527) — the description only discloses this for Jinja templates. "high" is not normalized, so a Chat "high" still reaches templates raw and still fails on Qwen3.8's pinned template ("Unexpected reasoning effort high", tests/frontend/qwen38.json:3089-3099). Non-string thinking/reasoning fields in Chat messages now 400 where they were previously ignored (disclosed as compat note a). Unknown nested reasoning.effort rejects while unknown top-level strings still pass through. No docs file is touched, though docs/api.md:596-628 and 955-995 are the specification for both halves and AGENTS.md:230 requires updating it.

Why / related work. The behaviour being changed is documented elsewhere as intended: open docs-only PR #172 records that GLM-5.3-Flash maps none/medium/xhigh to Max, and yatesdr's review of it states named-effort resolution belongs to Responses/Messages only. Closed issue #25 is the community precedent for "translate, don't reject" effort levels. On the output side, the lineage is #67/#179/#418/#573/#596 (all merged, same files); #670 (open, lukealonso) rewrites the same tagged.rs push/parse_candidate region for contract-parameterized delimiters, so textual conflicts are likely; closed issue #133 recorded GLM tool-parse rejections and explicitly left malformed-output parsing as "a separate parser/API concern", which is the half this PR does.

Evidence. The new decode tests build their own tokenizer and literal templates (decode.rs:1104-1175), so they do not depend on FLARE_TEST_TEMPLATE_DIR, and the output tests sweep every two-part UTF-8 split plus single-character streaming while preserving strict-tool and EOS rejection. The live SM120/BFCL/agentic_suite.py (not opened) claims have no in-repo harness, command, core id or log (agentic_suite/BFCL grep returns nothing) — the same gap Autobot flagged on the author's #457. Kani proofs are confirmed structurally unchanged (kani_proofs.rs:71-110) and unrun, as disclosed.

Community/process. Zero comments, reviews, reactions or labels; no CI checks on head; two independent fixes bundled on one branch; author is a CONTRIBUTOR with one prior merged PR in this exact file (#162, commit 5dd6723e) but not a priority contributor. Charter fit is mostly positive (documented APIs, no per-model branch, no core-format change) with tensions on "root cause" and the missing docs update.

#12 [high] Reach: who and what #677 affects

Reach of PR #677, verified from the diff and the code paths it feeds:

Users / clients:

Operators / configuration / deployment:

Documentation reach (stale after this PR):

Tests / CI reach: new Rust unit tests only; no Python server test, no tests/server/* change, no live-harness file added, so the behaviour is not covered by the CUDA-gated serving suites.

#8 [medium] People: author history (#162 merged in tagged.rs) and area owners

#13 [medium] Recent activity: what changed lately in the two touched areas

Recent activity in the areas #677 touches (from search_history on each path, and the orientation packet):

helios/src/output/tagged.rs (newest first): 99339606 2026-11-28 Luke Alonso "preserve JSON types for unconstrained tool parameter schemas" (#596); 2bdc8472 2026-11-28 Luke Alonso "tolerate omitted closing tags on complete tagged tool calls at EOS" (#573); 0b09434d 2026-11-22 Joshua Cartu "Constrain strict function-tool arguments in native tool syntax" (#418); 9d1e0137 2026-11-11 Mark Yong (#179); f76b517f 2026-11-11 Martin Vit (#228); 902c88e2 2026-11-02 yatesdr (#167); 5dd6723e 2026-11-02 Brandon M. Music (#162 — same author as #677). So the file changed five times in the three weeks before #677 and is owned in practice by Luke Alonso.

helios/src/server/protocol/decode.rs: cd1daa3e 2026-12-01 flare-autobot (#638) — the most recent change, one day before the branch point; e4d8eb60 2026-11-29 Frosty40 (#615); 85de9eae 2026-11-28 Joshua Cartu; 0b09434d (#418); ab606762 yatesdr; 902c88e2 (#167). decode.rs is a high-churn shared file touched by at least six different authors in the last six weeks.

Base/main state: PR base is main@1fbcc3c9 (2026-12-01); the packet reports no commits on the default branch since the branch point touching any of the six changed files, and search_history on pr/677 confirms the two #677 commits sit directly on top of 1fbcc3c9 (f439f744, 0b042e56), so the branch is up to date.

Build-on vs conflict: #677 builds directly on #596 (it calls super::tagged::container_parameter, strict_nonstring_raw, and the RawArguments/to_json_string helpers that #596 reshaped) and preserves #573's parse_eos contract verbatim. The live in-flight work that could conflict is open PR #670 (lukealonso), which rewrites the same ToolDialect/TaggedTools/ThinkReasoning structures to carry contract-supplied open/close, and which also edits argument_tags.rs; #670 was opened 2026-12-02 00:26, about ten hours before #677. Nothing in #677 reverses or undoes an earlier merged change: it is additive to the #67/#179/#418/#573/#596 series.