Final review report · NVIDIA/hyperflare-inference #686

Raw Markdown for agents: https://autobot.eidonix.com/p/69be4b29-a7c7-4172-8e78-56ae036fced2.md

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

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

  1. Update the contradicting unconditional claim in docs/core-design.md:1727-1728.
    • docs/core-design.md:1727-1728 still 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-1733 defers only "the accepted strict schema subset, parser formats, protocol mappings and streamed errors" to api.md, so it does not qualify or rescind :1727. Merging #686 with Fixes #445 leaves the core design specification contradicting docs/api.md on 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; see docs/api.md).

Subtract / Simplify

  1. Drop internal implementation shorthand ("shared lowering") and undefined option spelling (`chat`) in docs/api.md:667-674.
    • "shared lowering" (docs/api.md:667) appears nowhere else in docs/; it is lifted from the local variable let shared_lowering = ... in helios/src/server/request.rs:467 (.agents/skills/repo-prose/SKILL.md:22-25 (not opened) advises against turning implementation shorthand into document vocabulary). Because PromptEncoder has 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 the thinking_mode: "chat" value (helios/src/frontend/deepseek.rs:181-183), but thinking_mode is never defined anywhere in docs/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