#1 [high] Change: docs/api.md required-mode paragraph rewritten, +14/−8, one file
PR #686 (jcartu, branch docs/deepseek-required-tool-choice, head 6a2cacc, base main, opened 2026-12-02 20:47) changes only docs/api.md (+14/−8). Single hunk.
Before (main, docs/api.md:666-669): "Required mode needs at least one declared tool, adds an instruction to call a tool to the prompt, and validates that generation produced at least one completed call to a declared tool."
After (PR head, docs/api.md:666-678):
- "Required mode needs at least one declared tool."
- "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: 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." - "In all modes, including DeepSeek thinking mode, completion validates that generation produced at least one completed call to a declared tool."
Undeclared but harmless: the same hunk re-wraps the adjacent lines "Responses also supports text custom tools by presenting a JSON { "input": string } function…" (main :673-675 → head :679-681). No other hunk, no code, schema or test change. Nothing in the description claims more than the diff does.
Description is complete in the four required parts (why / what / expected result / evidence + limitation that no build or test was run) per AGENTS.md:72-80.
#2 [high] Claims verified: every statement in the new paragraph matches code and tests
Verified against head 6a2cacc:
-
"shared lowering (Jinja templates and TMLv0)" —
PromptEncoder::renders_tool_choice()returns true only forDeepseekV4 | DeepseekV41(helios/src/frontend/mod.rs:154-156), and the doc comment at :152-153 says self-rendering encoders get their own syntax while "other encoders receive the shared instruction messages instead".shared_lowering = !frontend.prompt_encoder().renders_tool_choice()at helios/src/server/request.rs:467 → true for Jinja (0) and TmlV0 (3). Accurate. -
"…add a system instruction to call a tool" —
template_messagesappends it only forToolChoice::Required(helios/src/server/inference.rs:387-390, text "You must call at least one of the provided tools in your next response. Choose the appropriate tool and arguments."), viaappend_system_instruction(helios/src/server/inference.rs:445-462) which prepends/merges into the leading system message. TMLv0 has a system frame kind (helios/src/frontend/tml.rs:424-425), so the instruction is expressible there. Accurate. -
"DeepSeek thinking mode renders required identically to auto" — request.rs passes
ToolChoice::Autototemplate_messagesfor non-shared encoders (helios/src/server/request.rs:472-476) and still puts "required" into template options (:506-514); helios/src/frontend/deepseek.rs:220-234 parses it, :272-274 rejects required with no tools, and :275-280 downgradesToolChoice::Required→Autoonly whenthinking_mode("Required calls are checked at completion; thinking starts before the tool block"). Tests: helios/tests/deepseek_requests.rs:690-711 assertsrequired.rendered_prompt == automatic.rendered_promptand tokens equal,output.content.start == OutputStart::Reasoning, prompt ends<|Assistant|><think>, for V4 and V4.1 across {}, {enable_thinking:true}, {thinking_mode:"thinking"}; also asserts required with empty tools errors. -
"non-thinking (chat) mode opens the DSML tool-call block at the end of the prompt" — test helios/tests/deepseek_requests.rs:348-415: with enable_thinking:false + tool_choice required,
output.content.start == OutputStart::ToolBody, rendered prompt trim_end ends with<|DSML|tool_calls>(V4) /<|DSML| calls>(V41); an "auto" control request instead accepts text{"ok":true}while required rejects it. Output-start detection lives in helios/src/model/prompt.rs:357-371 (DSMLcallsopener at prompt end + not ordinary text → ToolBody). -
"completion validates at least one completed call to a declared tool in all modes" —
Encoder::finisherrors "required tool choice was not satisfied: the model did not produce a completed tool call" for Required|Named when!outputs[index].has_tools()(helios/src/server/protocol/encode.rs:685-689); undeclared names are rejected for any non-Auto choice at encode.rs:582-584. Because the DeepSeek downgrade happens only inside the frontend's option parse, the server-siderequest.tool_choicestaysRequired, so both checks apply in thinking mode. This is exactly the point the issue reporter missed = the requirement is enforced post-hoc, not dropped.
#3 [high] Why: #445, triaged by a maintainer as a docs gap, fix directed at docs/api.md
Issue #445 (shieldstar, opened 2026-11-21 18:26, label area:api, still open) reported that tool_choice: "required" is "dropped" on DeepSeek V4/V4.1 in thinking mode: the server sees renders_tool_choice()==true, stops sending shared instruction messages and passes ToolChoice::Auto (issue cites helios/src/server/request.rs:336, :341-345, inference.rs:378-380, frontend/mod.rs:154-156, docs/api.md:493-495 at commit 25b49519).
Same-day triage by yatesdr (2026-11-21 18:38, issue's only comment) at main 21a40f05: "For DeepSeek V4 and V4.1 this is deliberate, and the gap is in the docs." Points at helios/src/frontend/deepseek.rs:275-280 ("Required calls are checked at completion"; commit 585702d3), test tests/deepseek_requests.rs:690, Encoder::finish failing with "required tool choice was not satisfied" (helios/src/server/protocol/encode.rs:553-557), and says 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."
So #686 implements a maintainer's explicit "the docs should say so" instruction — not an unsolicited doc rewrite. It fixes the documentation half of #445; the behavioral complaint (prompt differs between required and auto) is deliberately left as-is, and the issue remains open (#686 says "Fixes #445", so merging would close an issue whose behavioral request was declined).
History of the deliberate behavior: commit 585702d3 (Luke Alonso, 2026-10-29) "Allow required DeepSeek tool choices with thinking" — the only commit on helios/src/frontend/deepseek.rs that introduced the downgrade; the DeepSeek native encoders themselves came from 2a4fcb9f (2026-10-19) "Use official DeepSeek Rust prompt encoders" and ac7bfa9a (2026-10-29) "Integrate DeepSeek recipe 0.2 prompt and streaming APIs".
#4 [high] Undone by omission: docs/core-design.md:1727-1728 keeps the unconditional required-mode claim
docs/core-design.md:1727-1728 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." — the same unconditional claim #686 removes from docs/api.md. Two lines later (:1732) the design doc defers details to the API contracts ("See the API contracts"). #686 does not touch docs/core-design.md, so after this PR the design doc contradicts api.md for DeepSeek V4/V4.1; a reader of core-design.md keeps the original inaccurate statement.
Cross-references that also remain unconditional:
- docs/api.md:759-760 ("A required or named tool choice still fails if no qualifying call completed") — consistent with #686.
- docs/api.md:649-655 named-selection paragraph ("adding no instructions or decoding constraints") — consistent, and DeepSeek named selection does filter tool definitions (helios/src/server/request.rs:534-538) with prompt equal to auto (tests/deepseek_requests.rs:704-708).
- No docs/TODO.txt entry exists for this asymmetry, and none is needed: AGENTS.md:52-60 requires TODO entries for unresolved defects, while yatesdr in #445 called this designed behavior. Nothing in #686 hints at a spec-vs-code gap.
#11 [high] Research summary
Case file gathered for #686 (docs-only, one file, +14/−8 in docs/api.md). Ten scratchpad entries cover all eight angles.
Key findings a reader cannot get from the description:
- The fix is exactly a maintainer's written instruction. yatesdr triaged #445 the same day it was filed (2026-11-21 18:38): "For DeepSeek V4 and V4.1 this is deliberate, and the gap is in the docs… The docs should say so." #686 implements that, so it sits inside the charter's "bad docs" merge gate. But it says "Fixes #445", which would close an issue whose behavioral request (make required differ from auto) was declined — reading the docs fix as closing the behavioral complaint is the one mismatch worth flagging.
- Every new sentence verified true against
PromptEncoder::renders_tool_choice(frontend/mod.rs:154-156),template_inputs(server/request.rs:467, 472-476),template_messages' instruction (server/inference.rs:387-390), the DeepSeek downgrade (frontend/deepseek.rs:275-280),Encoder::finishenforcement (protocol/encode.rs:685-689), and tests deepseek_requests.rs:348-415 / :690-711. - Undeclared but harmless: the same hunk re-wraps the following "Responses also supports text custom tools" lines; nothing else changed, nothing claimed that was not done.
- Not fixed by this PR: docs/core-design.md:1727-1728 still states the old unconditional "
tool_choice=requiredadds a prompt instruction", so after merge the two documents disagree. - Overlap: #461 (same author, open, changes requested) edits the adjacent required/named-selection sentences; #685 (open, same day) rewrites docs/api.md:540-575. No textual conflict with #686's :666-680 hunk.
- Process gaps: zero reviews/comments/labels/reactions, and no CI checks on head 6a2cacc even though native-serving.yml triggers on all
pull_requestevents with no path filter; the description declares no build or test was run (appropriate for prose-only).
Also recorded: origin commit 585702d3 (Luke Alonso, "Allow required DeepSeek tool choices with thinking"), author history (#418 precursor; #404 closed), DeepSeek frontend ownership, reach on DeepSeek V4/V4.1 clients (thinking is the default, so the caveat is routine traffic), the #417 "don't silently drop API fields" tension, and the prefix-cache/echo implication of required-vs-auto prompts in chat mode.
#12 [high] Tension: "Fixes #445" closes an issue whose behavioral request was declined
#445 asks for two things (its "Suggested fix", issue body): (a) behavioral — "either pass ToolChoice::Required through to the encoder's own tool-choice syntax, or keep the shared instruction for required and let the encoder add its own syntax on top"; and (b) docs — "Also state the DeepSeek behaviour in the tool_choice documentation at docs/api.md:493-495."
yatesdr's triage (2026-11-21 18:38, issue's only comment) declines (a) as deliberate and endorses (b) as the fix. #686 declares "Fixes #445" in its description and is linked from the issue as [fixes].
Consequence worth flagging to deciders: merging with that keyword closes an issue whose primary complaint (required is prompted exactly like auto) remains true by design. The docs now disclose it, but the issue's own "Expected" paragraph — "the prompt seen by the model for required should differ from the prompt for auto" — is not satisfied and will not be recorded anywhere as an accepted design decision except this new paragraph. A reviewer may want the issue kept open or a maintainer note added rather than auto-closed. Purely a bookkeeping/decision point; the diff itself contains no behavior change (verified: docs-only, one hunk).
#14 [high] Claims and evidence: what the description asserts, what backs it, what is unbacked
Claims in the PR description, with their backing:
| Claim | Backing found |
|---|---|
renders_tool_choice returns true for DeepseekV4 and DeepseekV41 and bypasses shared lowering in template_inputs |
Verified: helios/src/frontend/mod.rs:154-156 (only those two variants); helios/src/server/request.rs:467 shared_lowering = !…renders_tool_choice() |
In thinking mode the frontend passes ToolChoice::Auto so reasoning begins in <think> with no added instruction |
Verified: helios/src/frontend/deepseek.rs:275-280; test deepseek_requests.rs:690-711 asserts rendered prompt/tokens identical to auto and ends <|Assistant|><think> |
In non-thinking (chat) mode the template opens the DSML tool-call block at the end of the prompt |
Verified: test deepseek_requests.rs:348-415 (OutputStart::ToolBody, prompt trim_end ends <|DSML|tool_calls> / <|DSML| calls>, auto control accepts text instead); detection in helios/src/model/prompt.rs:357-371 |
| Shared lowering encoders (Jinja, TMLv0) add a system instruction | Verified: server/inference.rs:387-390 + append_system_instruction :445-462; TMLv0 has a system frame (frontend/tml.rs:424-425) |
| Completion enforces a completed declared call in all modes | Verified: protocol/encode.rs:685-689 (Required |
| "No runtime code, schemas, or compatibility contracts changed" | Verified by the diff: docs/api.md only, one hunk |
| Evidence pointers named in the description (mod.rs, request.rs, inference.rs, deepseek.rs, encode.rs, the two test names) | All exist and say what is claimed; no mis-citation found |
| Limitation: no build/test/GPU run | Consistent with the change; nothing in the diff can affect compilation or runtime, and comparable docs PRs (#461) ran only a narrow lib test |
Nothing claimed is unbacked. What is not demonstrated anywhere: that the new wording reads correctly for TMLv0 in practice on a served Inkling 2 core — docs/TODO.txt:12-15 still tracks qualifying strict: true tools on a TMLv0 core, so the TMLv0 half of the first new sentence describes a path that has not been end-to-end qualified for tools. That is a small, pre-existing qualification gap the new text inherits by naming TMLv0 explicitly.
#17 [high] AMENDMENT: PR scope grew to 2 files; core-design.md gap closed in 9ca1f72
Correction to note #4 ("Undone by omission"): no longer true.
- Head is now 9ca1f72 ("docs: document DeepSeek V4/V4.1 behavior for tool_choice required"), rebased onto main (main tip ef38cb93/#661, cc0a49d2/#681).
pr_filesnow lists 2 files: docs/api.md (+8/−3) and docs/core-design.md (+5/−2) — total +13/−5, matching the description's stat line. - docs/core-design.md:1727-1731 now reads: "
tool_choice=requiredrequires a completed call to a declared tool; Jinja-template and TMLv0 prompt encoders also add a system prompt instruction, while native DeepSeek V4 and V4.1 encoders do not (see the API contracts). Without a grammar it uses ordinary sampling." The old unconditional "adds a prompt instruction" is gone (grep foradds a prompt instruction|instruction to call a toolin docs/ now returns only the two new sentences at api.md:667 and core-design.md:1728). - Link target verified: docs/api.md:485 is
## Conversation and tool semantics, so#conversation-and-tool-semanticsresolves. - The two normative docs no longer contradict each other on this point; core-design.md:1735 already links plainly to
(api.md)for the same section, so the new link duplicates an existing pointer (harmless).
Residual (unchanged by the author): core-design.md:1727 still states "requires a completed call to a declared tool" unconditionally, which is correct — undeclared calls fail for any non-Auto choice at helios/src/server/protocol/encode.rs:582-584 and the completed-call check is at :685-689.
#18 [high] AMENDMENT: process state changed — labels, a Changes-Requested review, and an author reply
Supersedes note #7 (which recorded zero labels / zero reviews / no CI).
- Labels on #686 (per read_item):
area:api,documentation,model:deepseek-v4,model:deepseek-v4.1,triage:review. So the "model:deepseek-v4*" classification now exists, created 2026-12-02 20:47, updated 21:45. - Discussion now has three entries: (1) flare-autobot case-file intake 20:50; (2) flare-autobot Full Review 21:06 recommending Changes Requested with 0 blockers / 1 should-fix / 1 subtract-simplify / 0 nits; (3) jcartu 21:45 replying that both items are addressed in 9ca1f72.
- Review's should-fix was exactly this run's earlier finding: docs/core-design.md:1727 kept the old unconditional claim. Its subtract/simplify was to drop the internal
"shared lowering"shorthand and undefined`chat`label from the api.md paragraph. - Not verifiable here: whether CI checks ran on 9ca1f72 (no check data in the local copy; the earlier "no checks on 6a2cacc" observation stands, and no new evidence either way). The stated re-review trigger is "90 minutes after code updates are pushed" if the PR is not re-summoned.
- Note titling risk: the review's own merge-risk line still says "up to 6a2cacc" — it predates the 9ca1f72 push, so its conflict/consistency statements describe the pre-fix state.
#19 [high] AMENDMENT: parts of the earlier report that still stand, plus one new nit
These parts of entry #16 are NOT amended by the 9ca1f72 push and should stand as written:
- "Fixes #445" tension (note #12) is unchanged. The description still ends with the closure keyword (read_item #686), and the behavior #445 asked for — required must prompt differently from auto on DeepSeek — is still deliberately not implemented (helios/src/frontend/deepseek.rs:276-279 maps Required→Auto in thinking mode; comment at :275 "Required calls are checked at completion"). Merging still closes an issue whose behavioral request was declined; yatesdr's triage in #445 (2026-11-21 18:38) said the fix is the docs, so this is a fair closure, but the report should keep the flag.
- Reach/downstream impact unaffected: still a DeepSeek V4/V4.1-only prose caveat, thinking mode is the default (helios/src/frontend/deepseek.rs:156-157 defaults
thinking_modeto "thinking"), so the "identical to auto" statement describes the default path for those recipes. - Charter mapping (note #9) unaffected: no runtime branches, docs-only, matches the "bad docs" merge criterion.
- Merge conflict with #461: the Autobot review's claim ("same required-mode paragraph, api.md 562-575 on pr/461 vs 666-678 here") was measured at 6a2cacc and cannot be re-checked locally (pr/461 is not in the local copy; search_history on pr/461 fails). Treat as plausible but stale — #461's head is 31c9020 (2026-11-29) and its api.md hunks are about named-selection/strict-admission scope, adjacent to rather than inside this paragraph. Downstream reviewers should confirm at merge time.
- Verified-claims table (note #2) still holds at the new head: api.md:666-674 and core-design.md:1727-1731 make the same three factual claims, all backed by helios/src/frontend/mod.rs:151-156, helios/src/server/request.rs:467-476 + :506-514, helios/src/server/inference.rs:387-390 and :445-461, helios/src/frontend/deepseek.rs:272-279, helios/tests/deepseek_requests.rs:347-415 and :689-711, helios/src/server/protocol/encode.rs:582-584 and :685-689.
- One new small nit introduced by the core-design edit: core-design.md:1735 already says "See the API contracts", so the new inline link to the same section at :1730 is a duplicate pointer two sentences apart.
#21 [high] Research summary
Amended entry #16 for PR #686 (docs: document DeepSeek V4/V4.1 behavior for tool_choice required, head now 9ca1f72, rebased onto main through ef38cb93/#661 and cc0a49d2/#681 — the latter two are scheduler-only and part of neither the PR nor the API docs).
Amendments delivered (notes #17–#20, superseding #4 and #7):
- Scale corrected. Two files, not one:
docs/api.md(+8/−3) anddocs/core-design.md(+5/−2), +13/−5 total. New prose sits atdocs/api.md:666-674(whole required-mode paragraph 666-677; Responses custom tools 678-684) anddocs/core-design.md:1727-1731. - The "Undone by omission" finding is withdrawn. The
docs/core-design.mdcontradiction this run flagged was fixed in9ca1f72: the unconditional "adds a prompt instruction" is replaced by the encoder split plus a link toapi.md#conversation-and-tool-semantics, which resolves (docs/api.md:485=## Conversation and tool semantics). A repo-wide grep foradds a prompt instruction|instruction to call a toolreturns only the two new sentences. The two normative docs no longer conflict. - Process picture changed. Five labels now exist (
area:api,documentation,model:deepseek-v4,model:deepseek-v4.1,triage:review); a flare-autobot review at 21:06 UTC recommended Changes Requested (0 blockers / 1 should-fix / 1 subtract-simplify, exactly the core-design gap and the internal"shared lowering"/`chat`shorthand), and jcartu replied at 21:45 that both are fixed in9ca1f72— grep confirms neither string survives. The review's merge-risk and #461-conflict statements were measured at6a2caccand describe the pre-fix state. No local evidence either way on CI for9ca1f72. - Unchanged: treating "Fixes #445" as closing an issue whose behavioural request was deliberately declined still stands as a flag (
helios/src/frontend/deepseek.rs:276-279maps Required→Auto in thinking mode); the verified-claims table still holds verbatim, now mirrored in both docs; reach (thinking is the default,deepseek.rs:156-157), charter fit and the "bad docs" merge criterion are unaffected. - New nit:
docs/core-design.md:1735already links toapi.md, so the new inline link at:1730is a duplicate pointer two sentences apart. - Caveat for downstream: the textual-conflict claim against #461 (
docs/api.md:562-575onpr/461) cannot be re-checked here —pr/461is absent from the local copy — and #461's hunks concern named-selection/strict-admission scope, adjacent rather than identical, so treat it as unverified at merge time.
Every angle has an entry and each orientation-packet lead is either followed or explicitly marked unverifiable.
#22 [high] AMENDMENT: revised verdict and final file map after 9ca1f72
Verdict for the write-up after the 9ca1f72 push (supersedes the "Changes Requested"-shaped conclusion in note #16/extended in #12):
- The single substantive defect this run identified (a normative doc contradicting another while closing an issue) is fixed at head. api.md:666-674 and core-design.md:1727-1731 now say the same thing and cross-link.
- api.md wording nit from the review (internal
"shared lowering"shorthand, undefined`chat`label) is also gone; both strings return no matches under docs/. - Remaining, non-blocking: (a)
Fixes #445closes an issue whose behavioural half was declined — defensible per yatesdr's 2026-11-21 triage but should be stated in the report; (b) duplicateapi.mdpointer at core-design.md:1730 vs :1735; (c) unverified #461 textual overlap; (d) no visible CI on 9ca1f72 and the docs-only/no-build limitation is declared by the author. - Net: from "Changes Requested" to approvable-with-nits; nothing in the push changes the docs-only blast radius (2 files, +13/−5) or the DeepSeek V4/V4.1 thinking-default reach.
Also for the report's file map: docs/api.md:485 is the section heading, so #conversation-and-tool-semantics resolves; the tool-choice contract now spans api.md:640-702 (choice surface 640-655, auto/undeclared 657-665, required 666-677, Responses custom tools 678-691, parallel limit 693-710) and core-design.md:1727-1736.
#5 [medium] Related work: #461 (same author, same section) and #685 (same file) overlap in file only
Both open, both edit docs/api.md, no textual overlap with #686's hunk (docs/api.md:666-680 on the PR head):
- #461 (jcartu, open since 2026-11-22, labels area:api/documentation/triage:review, +88/−26 over docs/api.md, docs/TODO.txt, helios/src/grammar/strict.rs) changes the adjacent named/required selection sentences: it makes required mode read "adds no decoding constraint" (main api.md:649-655 region), plus strict-schema admission and IEEE-754 range text. It has CHANGES_REQUESTED from yatesdr (2026-11-23) and an Autobot review (2026-11-24, 4 should-fix items), unanswered since jcartu's 2026-11-28 reply. So #686 is the same author's second docs PR in the same section while the first is still unmerged; if both land, the required-mode contract is described across two paragraphs written separately.
- #685 (peperunas, FIRST_TIME_CONTRIBUTOR, open 2026-12-02, 13 files, +662/−72) rewrites docs/api.md:540-575 for DSML streaming and also touches helios/src/output/dsml.rs and server/output.rs. Different region (≈540-575 vs 666-680), no merge conflict expected; both concern DeepSeek tool calls in the same "Conversation and tool semantics" section.
- Orientation-packet candidates #578 (deepseek-recipe bump), #637 (37-char tool-call IDs), #615 (thinking_token_budget), #670 (THINK_TAGS/TAGGED_JSON), #621 (jcartu, scheduler admission) share docs/api.md only, not this paragraph. None competes with or supersedes #686.
Note the sentence immediately preceding the hunk at docs/api.md:663-666 ("Tagged parameters … DeepSeek retains the original text of a string="false" parameter … Invalid JSON in a whole argument document or a typed XTML value fails parsing") is the doc text maintained by #359/#364/#578 lineage; #686 leaves it intact.
#6 [medium] People: jcartu's docs/DeepSeek series; DeepSeek frontend owned by Luke Alonso
jcartu, GitHub association CONTRIBUTOR (not one of the charter's priority contributors: @voipmonitor, @original-el8, @lukealonso — charter "Respect contributors"/AGENTS.md). Last 180 days: 3 merged, 3 closed, 3 open. Merged: #505 "Bind core-declared FP32 parameters into text forward graphs", #416 "Refresh host prefix-cache recency on request completion", #418 "Add strict function-tool schemas for DSML, Qwen, GLM and TML parsers" (2026-11-22, commit 0b09434d). Areas touched: docs (3), helios/src (3), heliopause/src (1), helios (1), helios/proto (1).
#418 is the direct precursor: it introduced the strict-tool grammar/admission work and updated the same api.md tool section (its review thread flagged missing sentences about named/required selection attaching a grammar, which #461 then wrote). So #686's DeepSeek required-mode text is the third iteration of the same author documenting required-mode semantics in this file.
Open siblings: #461 (docs: strict tool selection and numeric range precision, changes requested), #621 (scheduler admission vs core parameter declarations), #642 (ignition relocate_inductor). Closed: #520, #517, #404 (per-request activation steering for DeepSeek V4.1 cores — rejected/closed, showing prior DeepSeek-specific proposals from this author were not merged).
Who usually works these areas: docs commits in the last 180 days are Luke Alonso (391), Martin Vit (55), yatesdr (49). The DeepSeek frontend itself is Luke Alonso's (2a4fcb9f, ac7bfa9a, 585702d3) and Martin Vit's (tool parsing: #359, #364). yatesdr is the reviewer who triaged #445 and requested this doc change; he has not commented on #686.
#7 [medium] Process: ready, no reviews, no labels, no CI checks on head despite the pull_request trigger
Process (as of 2026-12-02, the day it opened): open, "ready for review" (not draft), 1 file +14/−8, head 6a2cacc, base c513e46. Zero reviews, zero comments (discussion empty), no labels, no reactions. CI: no checks on head 6a2cacc even though .github/workflows/native-serving.yml triggers on every pull_request (:6-7) and would build the release CLI and run the full helios test target on Linux and Windows (:43-68) — a docs-only change runs that whole pipeline because the workflow has no path filter.
Branch freshness: orientation packet reports no commits on main since the branch point touching docs/api.md, and git shows main's tip content at docs/api.md:655-686 identical to the PR's "before" text, so the PR is current (no rebase needed).
Missing evidence, declared: the description's own limitation — "no build, test suite, or GPU execution was run on this branch". For a docs-only diff this is consistent with practice on other docs PRs (e.g. #461 ran only lib grammar tests), and the change cannot affect build or runtime. What is not shown: a rendered check that the new sentence reads correctly in place, or that any doc link/table is unaffected — trivial here.
Prose/format: conforms to the repo's ~78-80 column wrapping of api.md, present tense, no conversation history, no unexplained identifiers; names PromptEncoder variants correctly ("DeepSeek V4 and V4.1" as opposed to enum spelling DeepseekV4), consistent with existing api.md usage at :980. PR description answers the four required questions in order (why / what / expected result / evidence + limitation), per AGENTS.md:72-80, and follows the charter's four-part description standard.
#8 [medium] Community: no comments, reviews or reactions; no Autobot case file posted
Community: no comments, no reviews, no reactions, no linked Discord discussion beyond the author's own "Discord: jcartu" line. Only engagement in the chain is yatesdr's 2026-11-21 triage comment on #445 itself, which #686 now implements; the issue has that single comment. So interest is: one maintainer's written request plus one contributor acting on it, one day short of two weeks later — nothing organic around the PR itself yet. Autobot has not posted a case file on #686 (unlike #685 and #461, both of which got one within minutes/hours), which is itself a sign the PR has had no automated or human traffic yet.
#9 [medium] Project fit: charter accepts "bad docs"; the #417 don't-drop-fields rule is the tension #686 resolves in prose
Charter fits:
- "What gets merged: PRs that address a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs." #686 fixes documentation that yatesdr called "not true for these recipes" in #445 — squarely inside the gate. AGENTS.md:165-166 likewise accepts "inaccurate documentation" as a sufficient basis.
- "Don't silently ignore API fields … Never accept it and quietly drop it (#417)." The DeepSeek path does accept
tool_choice: "required"and does not add a prompt instruction (deepseek.rs:275-280), which is why #445 read as a violation of this rule; the counter-argument (yatesdr, #445) is that the requirement is enforced at completion (encode.rs:685-689), so the field is not dropped, only lowered differently. #686 documents that reconciliation rather than changing behavior — no maintainer decision is needed to change an invariant, since nothing changes (AGENTS.md:204-207 concerns changing invariants). - "No per-model special cases or flags" — nothing added. The behavior documentated is a pre-existing per-encoder branch (
renders_tool_choice), i.e. #686 documents existing special-casing rather than removing it; a reviewer who objects to the branch itself (charter "Keep the runtime small and model-agnostic") would object to documenting it as intended, but that tension predates this PR (585702d3). - Prose rules (AGENTS.md:43-70, .agents/skills/repo-prose): "State designed behavior that the code does not implement as a specification marked designed, not implemented" — the new text describes implemented behavior, no marker needed. "Record unresolved defects … in docs/TODO.txt, not in design documents" — deliberately not applicable, since the behavior is designed, not a defect (see the core-design.md divergence entry).
- Compatibility contracts: description says none changed; verified, the diff is prose only.
#10 [medium] Reach: DeepSeek V4/V4.1 required-mode clients, thinking is the default; auto/required share a section
Who/what is affected:
- Clients of servers whose prepared core uses
PromptEncoder::DeepseekV4/DeepseekV41(DeepSeek V4 Flash, V4.1 Flash recipes) that sendtool_choice:"required". They now learn from the docs that the model receives no "you must call a tool" instruction in thinking mode, and that a required request can therefore end as HTTP 500 / terminal error event with "required tool choice was not satisfied" (encode.rs:688; api.md documents 500-or-terminal-error at :675-679) instead of a tool call. - Because DeepSeek V4/V4.1 default to thinking enabled (docs/api.md:980-981), the "thinking mode" case is the default for these cores — so the caveat applies to routine traffic, not an edge case.
- Non-thinking can be selected via the native option
thinking_mode:"chat"orenable_thinking:false(helios/src/frontend/deepseek.rs:181-190; api.md:1005-1006 tells users both encoders rejectdrop_thinking, assistant continuation,add_generation_prompt=falsebut does not list the accepted spellings for disabling thinking). In chat mode the new text says the prompt now ends inside the DSML envelope, which changes what a raw Completions echo/echoprompt shows and what prefix-cache entries look like between auto and required — worth noting since it means required and auto share a prefix-cache key in thinking mode but not in chat mode. - Jinja/TMLv0 cores (Qwen, GLM, Kimi, Inkling 2, MiMo, Nemotron…) are unaffected in behavior; only the wording now names them explicitly. Operators relying on the doc for TMLv0 (Inkling 2) see no change.
- No configuration, defaults, schemas, wire formats or dependencies change; no migration. The only artifact is the doc.
- Secondary reach: docs/core-design.md readers and anyone reading the older sentence keep the unconditional claim (separate entry), and #461 (open) edits the neighbouring required-mode sentences, so the final shape of this paragraph depends on both PRs.
#13 [medium] Recent activity: the tool-semantics section was rewritten repeatedly in the two weeks before this PR
docs/api.md on main has been touched daily in the last week (docs area owners: Luke Alonso 391, Martin Vit 55, yatesdr 49 commits/180d). Merged in the ten days before #686's branch point, each adding to the same "Conversation and tool semantics" section:
- #670 (2acc3f3a, Luke Alonso, 2026-12-02) THINK_TAGS parameterization, TAGGED_JSON tool parser, docs/api.md edits starting ~line 586 — the newest main commit before the branch; #686 is based on it (orientation packet: no main commits since branch point touch docs/api.md).
- #578 (92a5b888, Allyn Malventano, 2026-11-29) deepseek-recipe bump for aborted DSML parameter openers — the "DeepSeek retains the original text of a
string="false"parameter" sentence just above #686's hunk. - #573 (2bdc8472, Luke Alonso, 2026-11-28) tagged-parser EOS tolerance — same paragraph's neighbour.
- #638 (cd1daa3e, 2026-12-01) Responses tools/text.format echo; #637 (4ed5d875, 2026-11-30) 37-char call IDs — both rewrite text in this section.
- #418 (0b09434d, jcartu, 2026-11-22) strict function-tool schemas — the same author's earlier edit of this tool block.
DeepSeek frontend: no commit to helios/src/frontend/deepseek.rs since 71fed07b (yatesdr, 2026-11-19 "Keep request token spellings literal in Jinja prompts"); the required/thinking downgrade itself is untouched since 585702d3 (Luke Alonso, 2026-10-29). So #686 documents behavior that has been stable for over a month and that other recent DeepSeek merges (#578, #573) left alone. Nothing in recent activity conflicts with, reverses, or supersedes it; the only interaction is with still-open #461 and #685 editing the same file.
#15 [medium] File map: the two paragraphs of docs/api.md:640-702 and where #686 sits in them
docs/api.md, section "Conversation and tool semantics" (heading at :485 on main / same on head):
- :640-647 supported tools and
tool_choicespellings per protocol (auto/none/required/named/custom,namespace__name). - :649-655 named selection: "adding no instructions or decoding constraints"; every returned call must target the selected tool; "Missing and incomplete calls fail as in required mode" — #461 touches this region, #686 does not.
- :657-666 auto mode with undeclared tools, tagged-parameter retention, DeepSeek
string="false"retention, typed XTML. - :666-678 (PR head) / :666-669 (main): the required-mode paragraph — the only hunk in this PR. Main: "Required mode needs at least one declared tool, adds an instruction to call a tool to the prompt, and validates…". Head: splits tool requirement, shared-lowering encoders, native DeepSeek V4/V4.1 thinking vs chat rendering, then validation in all modes.
- :679-685 (head) Responses custom tools / namespaces — re-wrapped by this PR but textually unchanged.
- :687-692 Lark/regex grammars; :694-708 parallel_tool_calls.
- Related text elsewhere in the same file that stays consistent: :759-760 ("A required or named tool choice still fails if no qualifying call completed"), :980-981 (DeepSeek V4/V4.1 default to thinking enabled and high effort — makes the thinking caveat the default case), :1005-1006 (both native DeepSeek encoders reject
drop_thinking, assistant continuation,add_generation_prompt=false). - Conflicting text elsewhere: docs/core-design.md:1727-1732 (see separate entry).
#685 rewrites roughly docs/api.md:540-575 (DSML streaming, per its own diff at PR head :650-682 region for the arguments paragraph) — different paragraphs, no conflict.
#20 [medium] AMENDMENT: line ranges shifted — api.md new prose is 666-674, core-design.md 1727-1731
Citation precision at head 9ca1f72 (verified by read_file):
- docs/api.md: the rewritten required-mode text occupies lines 666-674; the rest of the original paragraph (sampling unchanged, missing-call errors, stream terminator) runs to :677, then Responses custom tools at :678-684. The earlier report's "docs/api.md:666-678" should be restated as 666-674 for the new prose (666-677 for the whole required-mode paragraph).
- docs/core-design.md: 1727-1731 for the rewritten sentence, with the follow-on named-selection sentences at 1731-1734 and the existing
tool_choice=none+ "See the API contracts" lines at 1735-1736. - Neither file's other content shifted, so anchors in notes #2/#15 remain valid modulo these ranges.
Also worth noting for the reviewer: the two main-branch commits in the same event (ef38cb93 #661, cc0a49d2 #681) are scheduler work (helios/src/scheduler/, docs/scheduling-.md) and are the rebase base, not part of this PR; they do not touch tool_choice or either normative API doc.