Recommendation: Changes Requested
The new required-mode prose in docs/api.md is factually accurate against the implementation and test suite at 6a2cacc, and directly addresses the maintainer triage on #445 with zero runtime blast radius. However, docs/core-design.md:1727 still carries the exact unconditional statement this PR exists to fix, leaving the two normative docs contradicting each other while Fixes #445 closes the issue. Updating that one sentence in docs/core-design.md—and optionally dropping the unexplained internal shorthand ("shared lowering" / `chat`) in docs/api.md—will make the documentation consistent and ready to merge.
Merge Risk
Level: Low
- Documentation-only diff (
docs/api.md, +14/−8); no runtime, scheduler, protocol, grammar, schema, or build paths are touched. - Zero concurrency, resource, failure-propagation, or cross-platform regression surface.
- Textual merge conflict exists with open PR #461 on the same required-mode paragraph in
docs/api.md(lines 666–678 here vs. lines 562–575 onpr/461); whichever lands second will need a small rebase.
Walkthrough
docs/api.md:666-674: Replaces the unconditional claim thattool_choice: "required"always adds a prompt instruction with an encoder-specific split:- Jinja-template and TMLv0 encoders add a system instruction to call a tool (
helios/src/frontend/mod.rs:154-156,helios/src/server/request.rs:467-476,helios/src/server/inference.rs:387-390). - Native DeepSeek V4 and V4.1 encoders omit that instruction—rendering required mode identically to
"auto"in thinking mode so reasoning begins in<think>(helios/src/frontend/deepseek.rs:272-280,helios/tests/deepseek_requests.rs:690-711), and opening the DSML tool-call block at the end of the prompt in non-thinking mode (helios/tests/deepseek_requests.rs:348-415). - Completion validation enforces at least one completed call to a declared tool across all modes, including DeepSeek thinking mode (
helios/src/server/protocol/encode.rs:582-584,:685-689).
- Jinja-template and TMLv0 encoders add a system instruction to call a tool (
docs/api.md:674-681: Reflows the remainder of the same paragraph (unchanged wording for sampling, missing-call errors, and Responses custom tools).
Pre-merge Checks
- [PASS] Security / malicious screen: Prose-only change in
docs/api.md; no code, links, scripts, or prompt-injection vectors. - [PASS] Charter & value fit: Directly addresses maintainer triage on #445 ("bad docs" merge criterion) without adding runtime per-model branches.
- [WARN] Related / duplicate / conflict check: Not a duplicate, but directly conflicts textually with the author's own open PR #461 (
docs/api.md:562-575onpr/461edits the same required-mode paragraph);docs/core-design.md:1727also remains out of sync. - [PASS] Tests & verification evidence: Every statement was verified against the implementation and existing tests (
helios/tests/deepseek_requests.rs:348-415,:690-711); omitting a build/GPU run is declared and acceptable for a docs-only diff.
Blockers
None.
Should Fix
- Update the contradicting unconditional claim in
docs/core-design.md:1727-1728.docs/core-design.md:1727-1728still states unconditionally:`tool_choice=required` adds a prompt instruction and requires a completed call to a declared tool.- The pointer at
docs/core-design.md:1732-1733defers only "the accepted strict schema subset, parser formats, protocol mappings and streamed errors" toapi.md, so it does not qualify or rescind:1727. Merging #686 withFixes #445leaves the core design specification contradictingdocs/api.mdon the exact sentence #445 flagged (violating.agents/skills/repo-prose/SKILL.md:26-27(not opened)). - Fix: Remove the stale clause at
docs/core-design.md:1727(e.g.,`tool_choice=required` requires a completed call to a declared tool.or note that Jinja/TMLv0 encoders also add a prompt instruction while native DeepSeek V4/V4.1 encoders do not; seedocs/api.md).
Subtract / Simplify
- Drop internal implementation shorthand (
"shared lowering") and undefined option spelling (`chat`) indocs/api.md:667-674."shared lowering"(docs/api.md:667) appears nowhere else indocs/; it is lifted from the local variablelet shared_lowering = ...inhelios/src/server/request.rs:467(.agents/skills/repo-prose/SKILL.md:22-25(not opened) advises against turning implementation shorthand into document vocabulary). BecausePromptEncoderhas only four variants (helios/src/frontend/mod.rs:142-149), naming the encoders directly is exhaustive and shorter.- Similarly,
(`chat`)(docs/api.md:671) backticks thethinking_mode: "chat"value (helios/src/frontend/deepseek.rs:181-183), butthinking_modeis never defined anywhere indocs/api.md. - Suggested tightening for
docs/api.md:666-674:Required mode needs at least one declared tool. Jinja-template and TMLv0 prompt encoders add a system instruction to call a tool to the prompt. The native DeepSeek V4 and V4.1 prompt encoders add none: in thinking mode they render required mode identically to `"auto"` so reasoning starts in `<think>`, and in non-thinking mode their template opens the DSML tool-call block at the end of the prompt so generation starts inside the tool-call envelope. In all modes, including DeepSeek thinking mode, completion validates that generation produced at least one completed call to a declared tool.
Nits
None.
Dropped on verification
- "
Fixes #445closes an issue whose behavioral request was declined without recording the decline" (Discovery Dossier / Value Proposition): Dropped. Maintaineryatesdralready recorded the design ruling directly on #445 (2026-11-21: "For DeepSeek V4 and V4.1 this is deliberate, and the gap is in the docs… The docs should say so"). Closing #445 viaFixes #445is appropriate oncedocs/core-design.md:1727is also updated. - "
render required mode identically to \"auto\"overstates equivalence for strict tools" (Correctness & Contracts lens): Dropped. Atdocs/api.md:668-670, the subject is "The native DeepSeek V4 and V4.1 prompt encoders" and the verb is "render", which accurately scopes the statement to prompt rendering (helios/src/frontend/deepseek.rs:276-280,helios/tests/deepseek_requests.rs:697-703). Strict-tool grammar enforcement (require_callathelios/src/server/request.rs:278-281,helios/src/grammar/strict.rs:1829-1835) relates to the pre-existing"Sampling is unchanged"sentence (docs/api.md:674), which is already being updated in open PR #461. - "Undeclared rewrap of Responses custom-tools lines (
docs/api.md:679-681)" (Discovery Dossier / Value Proposition): Dropped. Those lines belong to the same paragraph (no blank line separator) and are normal ~78–80 column reflow with byte-identical text. - "Overlap with #461 is file-level only; no textual conflict" (Discovery Dossier): Corrected/dropped. Checking
pr/461(docs/api.md:562-575) shows #461 modifies the exact same required-mode paragraph (Required mode needs at least one declared tool... Sampling is unchanged...), so a textual conflict does exist between the two open PRs (noted under Merge Risk and Pre-merge Checks). - "Pre-existing TMLv0 qualification gap in
docs/TODO.txt:12-15" (Discovery Dossier / Value Proposition): Dropped as out of scope; that TODO tracks end-to-endstrict: truequalification on a TMLv0 core, not prompt-instruction lowering intemplate_messages. - "False definite reference on
that shared instruction" (Subtraction & Simplicity lens): Narrowed;"a system instruction to call a tool"is introduced in the immediately preceding sentence, so only the invented"shared lowering"shorthand is kept under## Subtract / Simplify.