#1 [high] Main finding: docs/core-design.md still carries the unconditional required-mode claim the PR corrects
docs/core-design.md:1727-1729 (verified at PR head) still reads:
tool_choice=required adds a prompt instruction and requires a completed call
to a declared tool. Without a grammar it uses ordinary sampling. Named tool
selection filters the definitions to that tool; ...
and :1732-1733 says "See the API contracts for the accepted strict schema subset, parser formats, protocol mappings and streamed errors." The PR's whole justification (issue #445, yatesdr triage: "docs/api.md:537-540 says required mode 'adds an instruction to call a tool to the prompt', which is not true for these recipes. The docs should say so") applies verbatim to core-design.md:1727. Neither file's link resolves the conflict: core-design's pointer goes to api.md generally, not to the required-mode paragraph.
Effect: after merge, the two normative docs disagree. api.md:667-668 says only shared-lowering encoders add the instruction; core-design.md:1727 says required mode unconditionally adds one. Fix: amend core-design.md:1727 in the same PR (e.g. "tool_choice=required requires a completed call to a declared tool; shared-lowering prompt encoders also add a prompt instruction"), since the PR already declares docs scope and #445's triage asked for exactly this correction.
#2 [high] Verified accuracy of the new api.md paragraph against implementation and tests
Citations verified at PR head:
renders_tool_choicetrue only for DeepseekV4/V41: helios/src/frontend/mod.rs:151-156.- shared lowering = !renders_tool_choice, and Required is replaced by Auto for the messages: helios/src/server/request.rs:465-476;
"required"still goes into template options at :506-514, so the native encoder sees it. - thinking-mode downgrade + "Required calls are checked at completion": helios/src/frontend/deepseek.rs:272-280 (
let tool_choice = if tool_choice == ToolChoice::Required && thinking_mode { ToolChoice::Auto }). - non-thinking chat spelling: helios/src/frontend/deepseek.rs:181-190 (
thinking_mode: "chat"/enable_thinking: false). - shared instruction text appended for Required: helios/src/server/inference.rs:387-390 ("You must call at least one of the provided tools in your next response...").
- thinking prompt identical to auto: helios/tests/deepseek_requests.rs:697-703 (
assert_eq!(required.rendered_prompt, automatic.rendered_prompt), start Reasoning, ends<|Assistant|><think>), for V4 and V41 across {}, {enable_thinking:true}, {thinking_mode:"thinking"}. - chat mode opens DSML block: helios/tests/deepseek_requests.rs:348-415 (OutputStart::ToolBody; prompt trim_end ends
<|DSML|tool_calls>(V4) /<|DSML| calls>(V41)); detection at helios/src/model/prompt.rs:357-371. - completion validation: helios/src/server/protocol/encode.rs:685-689 ("required tool choice was not satisfied: the model did not produce a completed tool call"), undeclared-name rejection at :582-584. So: no inaccurate claim in the PR description or the new prose about prompt rendering or completion; docs-only, no runtime path touched.
#3 [high] Research summary
Reviewed PR #686 (docs/api.md only, +14/−8, one hunk) under the Correctness/Contracts/System-level lens. The diff is prose-only; no runtime, wire, proto, captured-graph, admission or metric sampling path is touched, so the concurrency, contention, memory-amplification, failure-blast-radius and metric-span checks come back clean by construction (the only code change is none).
Accuracy checks out. Prompt-rendering claims in the new paragraph (docs/api.md:666-674) all trace to the implementation and tests at head: renders_tool_choice true only for DeepseekV4 | DeepseekV41 (helios/src/frontend/mod.rs:151-156); shared lowering is its negation and non-shared encoders receive ToolChoice::Auto for messages while "required" still reaches template options (helios/src/server/request.rs:465-476, :506-514); the thinking-mode downgrade with comment "Required calls are checked at completion" (helios/src/frontend/deepseek.rs:272-280); the chat spelling (helios/src/frontend/deepseek.rs:181-190); the shared instruction text (helios/src/server/inference.rs:387-390); the thinking prompt identical to auto (helios/tests/deepseek_requests.rs:697-703); the DSML envelope start in chat mode (helios/tests/deepseek_requests.rs:348-415, prompt ending asserted at helios/tests/deepseek_encoder.rs:389-397); and completion validation in all modes (helios/src/server/protocol/encode.rs:685-689, undeclared-name rejection :582-584). The PR description's before/after claims match docs/api.md main :666-669 versus head :666-678, and its stated scope matches the diff.
Two findings, both written to the scratchpad with quotes. Major: the PR corrects the unconditional "required adds a prompt instruction" claim in api.md but leaves the identical claim standing in docs/core-design.md:1727-1729 ("tool_choice=required adds a prompt instruction and requires a completed call to a declared tool"), which is the very sentence yatesdr's #445 triage said was false for these recipes; core-design.md:1732 only defers to api.md in general, so the two normative docs will disagree after merge. Minor: the new sentence's "in thinking mode they render required mode identically to "auto"" is true of the prompt, but with an active strict tool the request still forces generation (require_call from request.tool_choice, helios/src/server/request.rs:277-281; helios/src/grammar/strict.rs:1829-1845), and helios/tests/deepseek_requests.rs:809-816 shows a default-thinking required request with a strict tool rejects plain prose — a reader could take the paragraph as behavior-identity rather than rendering-identity, so one qualifying clause would help.
#4 [high] Finding 1 severity + exact framing (Major): core-design.md not updated
Severity: Major. File:line: docs/core-design.md:1727-1729 (unchanged by the PR; diff touches only docs/api.md).
Verbatim (head):
tool_choice=required adds a prompt instruction and requires a completed call
to a declared tool. Without a grammar it uses ordinary sampling. Named tool
selection filters the definitions to that tool; it does not by itself enable a
grammar.
and :1732-1733: "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."
Contrast with the changed text, docs/api.md:667-674 (head): Prompt encoders using shared lowering (Jinja templates and TMLv0) add a system instruction to call a tool to the prompt. The native DeepSeek V4 and V4.1 prompt encoders omit that shared instruction ...
Impact: issue #445's only comment (yatesdr, 2026-11-21) said "docs/api.md:537-540 says required mode 'adds an instruction to call a tool to the prompt', which is not true for these recipes. The docs should say so." The same false statement survives verbatim in core-design.md:1727, the document AGENTS.md:227 routes runtime/frontend changes to. A reader of core-design.md keeps the original inaccuracy after this PR merges, so half of the maintainer's stated docs gap stays open while Fixes #445 closes the issue.
Fix: in this PR (docs-only scope already declared), amend core-design.md:1727 to separate the two halves, e.g. "tool_choice=required requires a completed call to a declared tool; shared-lowering prompt encoders (Jinja, TMLv0) also add a prompt instruction, while the native DeepSeek V4/V4.1 encoders do not." Alternatively drop the instruction half and link api.md's required-mode paragraph directly instead of the file-level link at :1732.
#5 [medium] Finding 2 (Minor): "renders identically to auto" is prompt-identity only; strict tools still force a call
Severity: Minor (wording precision, not a factual error). File:line: docs/api.md:669-670 (head).
Verbatim:
in thinking mode they render
required mode identically to "auto" so reasoning starts in <think>, and in
non-thinking (chat) mode their template opens the DSML tool-call block at the
end of the prompt so generation starts inside the tool-call envelope.
Why it can mislead: the prompt is identical, but the request grammar is not. prepare_request derives the strict tool plan from the server-side request.tool_choice, which stays Required (the downgrade happens only in frontend option parsing at helios/src/frontend/deepseek.rs:272-280):
helios/src/server/request.rs:277-281 allow_undeclared: request.tool_choice == ToolChoice::Auto, require_call: matches!( request.tool_choice, ToolChoice::Required | ToolChoice::Named(_) ),
and helios/src/grammar/strict.rs:1829-1835 makes the body branches "tools_entry" only when plan.require_call, so plain prose is masked out. The in-repo test proves the observable difference on the default (thinking) path: helios/tests/deepseek_requests.rs:809-816
let req_single = json!({ "tools": tools, "tool_choice": "required", "parallel_tool_calls": false }); assert!(!f.accepts(req_single.clone(), "Thinking.</just text."));
(preceded by assert!(!f.accepts(req_single.clone(), "Thinking.</think>Just text."));) while the auto control at :774 accepts plain prose.
Concrete impact: with a strict: true tool and default thinking enabled, required and auto produce the same prompt but constrained sampling differs; a reader who takes "renders identically to auto" as behavior-identity may be surprised that the must-call requirement is also enforced during decoding, not only at completion. The paragraph's next sentence does say completion validates the call, so the risk is limited to the strict-tool case.
Concrete fix: qualify the clause, e.g. "in thinking mode they render the same prompt as "auto" (reasoning starts in <think>); a strict tool still constrains sampling so only a declared tool call can follow reasoning."