Explore report · NVIDIA/hyperflare-inference #686

Raw Markdown for agents: https://autobot.eidonix.com/p/1cb03298-2716-4e23-ab28-33b3c7f03c2e.md

Case file: PR #686 — docs(api): document DeepSeek V4/V4.1 behavior for tool_choice required

https://github.com/NVIDIA/hyperflare-inference/pull/686 · open, ready for review, opened 2026-12-02, head 6a2cacc, base c513e46 (main) · +14/−8 in 1 file · no labels, no reviews, no CI checks.

Key findings

1. The change, in plain terms

Single hunk in docs/api.md, section "Conversation and tool semantics" (heading at :485), required-mode paragraph.

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), four statements:

  1. "Required mode needs at least one declared tool." (:666-667)
  2. "Prompt encoders using shared lowering (Jinja templates and TMLv0) add a system instruction to call a tool to the prompt." (:667-668)
  3. "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." (:668-672)
  4. "In all modes, including DeepSeek thinking mode, completion validates that generation produced at least one completed call to a declared tool." (:672-674)

Not declared in the description: the same hunk re-wraps docs/api.md main :673-675 → head :679-681 ("Responses also supports text custom tools …"), byte-identical text. No other hunk, no code, schema, test or compatibility change (pr_diff). The description declares the correct scope, and it follows the AGENTS.md four-part template (why / what / expected result / evidence + limitation).

2. Why: the problem, in history

3. Claims and evidence

Everything in the description checks out; nothing claimed is unbacked.

Claim Evidence
renders_tool_choice true for V4/V4.1, bypassing shared lowering in template_inputs helios/src/frontend/mod.rs:151-156 (matches only `DeepseekV4
Thinking mode renders identical to "auto", reasoning starts in <think> helios/src/frontend/deepseek.rs:272-280 (required with no tools errors; Required → Auto only when thinking_mode, comment "Required calls are checked at completion; thinking starts before the tool block"); test helios/tests/deepseek_requests.rs:690-711 asserts required.rendered_prompt == automatic.rendered_prompt, equal tokens, OutputStart::Reasoning, prompt ends <|Assistant|><think>, for V4 and V4.1 across {}, {enable_thinking:true}, {thinking_mode:"thinking"}, plus required-with-empty-tools error
Non-thinking (chat) mode opens the DSML block at the end of the prompt helios/tests/deepseek_requests.rs:348-415: OutputStart::ToolBody; prompt trim_end() ends <|DSML|tool_calls> (V4) / <|DSML| calls> (V41); grammar present; required rejects an ordinary {"ok":true} answer while an auto control accepts text. Detection at helios/src/model/prompt.rs:357-371
Shared-lowering encoders (Jinja, TMLv0) add a system instruction helios/src/server/inference.rs:387-390 appends "You must call at least one of the provided tools in your next response…" for ToolChoice::Required via append_system_instruction (:445-462); TMLv0 has a system frame kind (helios/src/frontend/tml.rs:424-425)
Completion validates a completed declared call in all modes helios/src/server/protocol/encode.rs:685-689 errors "required tool choice was not satisfied: the model did not produce a completed tool call" for `Required
"No runtime code, schemas, or compatibility contracts changed" Verified: one file, prose only
Limitation: no build/test/GPU run Declared by the author; nothing in the diff can affect compilation or runtime. Comparable docs PR #461 ran only a narrow lib grammar test

Not demonstrated anywhere: end-to-end qualification of the TMLv0 half of the first new sentence — docs/TODO.txt:12-15 still tracks qualifying strict: true tools on a TMLv0 core. Pre-existing, inherited by naming TMLv0 explicitly.

5. Recent activity in the touched area

docs/api.md changed almost daily in the ten days before the branch point, and #686 builds on that text rather than conflicting with it:

DeepSeek frontend: no commit to helios/src/frontend/deepseek.rs since 71fed07b (yatesdr, 2026-11-19); the required/thinking downgrade is untouched since 585702d3 (2026-10-29). The documented behavior has been stable for over a month. Nothing recent conflicts with, reverses, or supersedes #686, and by the orientation packet no main commits since the branch point (c513e46) touch docs/api.md, so no rebase is needed.

6. People

7. Community

Nothing organic. Zero comments, zero reviews, zero reactions, no linked discussion; the only engagement in the chain is yatesdr's pre-existing triage comment on #445. Autobot has not posted a case file on #686 (unlike #685 and #461, each of which got one shortly after opening), consistent with the PR having had no automated or human traffic.

8. Project fit (charter and repo rules)

9. File map and conflicting text

docs/api.md, section "Conversation and tool semantics":

10. Reach

11. Process

Open and marked ready for review (not draft). No CI checks on head 6a2cacc even though .github/workflows/native-serving.yml (not opened) triggers on every pull_request and has no path filter — a docs-only PR would run the whole release-CLI build and helios test target on Linux and Windows, but nothing has started. Branch is current (no main commits touching docs/api.md since c513e46). Prose conforms to the file's ~78-80 column wrapping and present tense, and names the encoders in prose ("DeepSeek V4 and V4.1") rather than by enum spelling. Age at review: under a day.

Open questions / not found