#1 [high] Verified accuracy of the new required-mode prose (both docs)
At 9ca1f72 the two hunks are prose-only (docs/api.md +8/-3, docs/core-design.md +5/-2; pr_diff).
Claim-by-claim verification against the PR head:
- "Jinja-template and TMLv0 prompt encoders add a system instruction": helios/src/frontend/mod.rs:151-156
renders_tool_choicematches only DeepseekV4|DeepseekV41; helios/src/server/request.rs:467let shared_lowering = !frontend.prompt_encoder().renders_tool_choice();; :472-476 passes the request's tool_choice only when shared_lowering; helios/src/server/inference.rs:387-390 appends "You must call at least one of the provided tools in your next response. Choose the appropriate tool and arguments." — enumeration of all four PromptEncoder variants is exhaustive, so no encoder is left unclassified. - "required mode needs at least one declared tool": helios/src/server/inference.rs:190-192 and helios/src/frontend/deepseek.rs:272-273.
- "native DeepSeek V4/V4.1 add none; thinking mode renders identically to auto so reasoning starts in ": helios/src/frontend/deepseek.rs:275-280 (
Required → Autowhen thinking_mode); test helios/tests/deepseek_requests.rs:690-711 asserts required.rendered_prompt == automatic.rendered_prompt, equal tokens, OutputStart::Reasoning, and prompt ends with "<|Assistant|>". - "non-thinking mode their template opens the DSML tool-call block at the end of the prompt": test helios/tests/deepseek_requests.rs:348-415 asserts output.content.start == OutputStart::ToolBody and rendered_prompt.trim_end().ends_with("<|DSML|tool_calls>") / "<|DSML| calls>".
- "In all modes ... completion validates ≥1 completed call to a declared tool": helios/src/server/protocol/encode.rs:582-584 (undeclared name rejected when tool_choice != Auto) and :685-689 ("required tool choice was not satisfied"), with Encoder::new receiving the semantic request.tool_choice (helios/src/server/http.rs:366) so the check is not affected by the encoder-side re-lowering to Auto. Streaming/buffered error mapping also matches docs/api.md:675-677 (protocol/tests.rs:322-364). No behavioural claim in either doc exceeds what the code/tests show.
#2 [high] Research summary
Correctness, Contracts & System-Level Consequences review of PR #686 (head 9ca1f72)
Verdict: sound. No blockers, no majors. Two minor nits, both documentation-level.
What I verified in context
The diff is prose-only in two files (docs/api.md +8/−3, docs/core-design.md +5/−2, confirmed by pr_diff/pr_files). I traced every factual claim in the new text to the implementation and tests at the PR head:
- "Jinja-template and TMLv0 prompt encoders add a system instruction" —
helios/src/frontend/mod.rs:151-156(renders_tool_choicematches onlyDeepseekV4 | DeepseekV41, and the enum at:140-149has exactly four variants, so the split is exhaustive with no encoder unclassified);helios/src/server/request.rs:467and:472-479pass the request'stool_choiceonly whenshared_lowering;helios/src/server/inference.rs:387-390appends the "You must call at least one of the provided tools…" instruction. Confirmed byhelios/src/server/protocol/tests.rs:285-319. - "Required mode needs at least one declared tool" — mirrored in both the shared path (
helios/src/server/inference.rs:190-192) and the native path (helios/src/frontend/deepseek.rs:272-273). - "In thinking mode they render required mode identically to
autoso reasoning starts in<think>" —helios/src/frontend/deepseek.rs:275-280(Required → Autowhenthinking_mode); testhelios/tests/deepseek_requests.rs:690-711asserts equal rendered prompt, equal tokens,OutputStart::Reasoning, and that the prompt ends in<|Assistant|><think>. - "In non-thinking mode their template opens the DSML tool-call block at the end of the prompt" — test
helios/tests/deepseek_requests.rs:348-415assertsoutput.content.start == OutputStart::ToolBodyandrendered_prompt.trim_end().ends_with("<|DSML|tool_calls>")(V4) /"<|DSML| calls>"(V4.1). - "In all modes … completion validates at least one completed call to a declared tool" —
helios/src/server/protocol/encode.rs:582-584(undeclared name rejected whenevertool_choice != Auto) and:685-689("required tool choice was not satisfied"). Crucially, the encoder receives the semanticrequest.tool_choice(helios/src/server/http.rs:366(not opened)), not the value re-lowered toAutofor the DeepSeek prompt, so the validation claim holds even though the prompt rendering does not — this is exactly the asymmetry the PR documents. Error mapping (HTTP 500 buffered / terminal error event, no success terminator) matcheshelios/src/server/protocol/tests.rs:322-364.
No claim in either hunk exceeds what the code and existing tests show, and there is no runtime, wire-schema, grammar, scheduler or concurrency surface in this diff — so areas 1 and 2 (safety, contention, memory, failure propagation, platform parity) are genuinely unaffected, and I say so rather than inventing findings.
Findings (both Minor)
-
docs/core-design.md:1729-1730— the new sentence points at a section that covers the encoder split only inapi.md, while a second, older pointer to the same file already sits two sentences later at:1735.Minor. Quote: "…while native DeepSeek V4 and V4.1 encoders do not (see the [API contracts](api.md#conversation-and-tool-semantics))." followed at:1735by "See the [API contracts](api.md) for the accepted strict schema subset…". Duplicate adjacent pointers; trim one. (Anchor itself is valid:docs/api.md:485is## Conversation and tool semantics.) Non-blocking. -
docs/api.md:666-674conflates two different mechanisms in the word "validates", and the split omits the strict-tool grammar path.Minor. The new text says required mode "validates that generation produced at least one completed call to a declared tool" in all modes, which is true for the output-side check (encode.rs:685-689), but when an active strict tool is declared the requirement is also pushed into the decoding grammar (helios/src/server/request.rs:277-284:allow_undeclared: request.tool_choice == ToolChoice::Auto, thenrequire_call: matches!(request.tool_choice, ToolChoice::Required | ToolChoice::Named(_))). So on DeepSeek in non-thinking mode the phrase "Sampling is unchanged" (docs/api.md:674) is only accurate when no strict tool is declared — with a strict tool the grammar is altered. The existing later paragraph atdocs/api.md:760-768does describe grammar enforcement, so the fix is a half-clause ("…with an active strict tool, the call is also required by the request grammar") rather than new structure. Non-blocking, but it is the one place where the new prose is looser than the code.
Other observations, not findings
Fixes #445still closes an issue whose behavioural half was deliberately declined (yatesdr's triage in #445 explicitly redirected the fix to the docs, and he points at the samedeepseek.rs:275-280), so closing as won't-fix-by-design is defensible; the residual risk is that acceptance criteria forrequireddiffer from upstream vLLM/SGLang, which the new text atdocs/api.md:667-674now states plainly — that satisfies the "don't silently ignore API fields" charter rule for this encoder pair rather than violating it.- The
#461textual overlap on the samedocs/api.mdrequired-mode paragraph is a rebase-order concern only;pr/461is not in the local copy so I could not re-measure it. - No CI evidence for
9ca1f72and no run declared; for a prose-only diff this is acceptable, and the referenced tests (helios/tests/deepseek_requests.rs:348-415,:690-711) already exist onmain, so no new test is needed for a docs change.
#3 [high] Verdict + 2 minor findings (correctness/contracts lens) for PR #686
Sheet: docs-only diff at 9ca1f72 (docs/api.md +8/−3, docs/core-design.md +5/−2). No runtime/concurrency/memory/parity surface — areas 1 & 2 unaffected, stated plainly, no invented findings.
MINOR 1 — docs/core-design.md:1729-1730 vs :1735 (duplicate pointer).
Quote: "…while native DeepSeek V4 and V4.1 encoders do not (see the API contracts). Without a grammar it uses ordinary sampling." then at :1735 "tool_choice=none removes tools from the template. See the API contracts for the accepted strict schema subset, parser formats, protocol mappings and streamed errors."
Two pointers to the same file in adjacent sentences. Anchor valid: docs/api.md:485 = "## Conversation and tool semantics". Fix: drop one link. Non-blocking.
MINOR 2 — docs/api.md:666-674 omits the strict-tool grammar path, so "Sampling is unchanged" is over-broad.
Evidence: helios/src/server/request.rs:277-284 builds ToolGrammarPlan with
allow_undeclared: request.tool_choice == ToolChoice::Auto,
require_call: matches!(request.tool_choice, ToolChoice::Required | ToolChoice::Named(_)),
i.e. with an active strict tool the required-call requirement is ALSO pushed into the decoding grammar, and sampling is not unchanged. The new prose at api.md:672-674 says completion "validates" the call and "Sampling is unchanged; no calls are fabricated". Existing later paragraph docs/api.md:760-768 already covers grammar enforcement for strict tools, so fix is a half-clause ("with an active strict tool the call is also required by the request grammar"). Non-blocking, but it is the loosest sentence in the new text.
Supporting verification already saved in note #1 (accuracy of every claim; encoder receives semantic request.tool_choice from helios/src/server/http.rs:366, so encode.rs:685-689 validation still applies even though the DeepSeek prompt was lowered to Auto).
Non-findings worth reporting briefly:
- "Fixes #445" closes an issue whose behavioural half yatesdr deliberately declined in #445 and redirected to docs ("this is deliberate, and the gap is in the docs… The docs should say so"), citing the same helios/src/frontend/deepseek.rs:275-280. Defensible; new prose now satisfies the charter's "don't silently drop API fields" rule for this encoder pair.
- #461 textual overlap on the same api.md required-mode paragraph = rebase-order risk only; pr/461 not in local copy, unverifiable.
- No CI on 9ca1f72, no run declared — acceptable for prose-only; referenced tests (helios/tests/deepseek_requests.rs:348-415, :690-711) already exist on main, so no new test is required for a docs change.