#3193 made the private NPU route and the layer lane refuse any chat that carries tools, because their generators
cannot install a tool grammar and a demanded call answered as prose is the wrong shape. But a request whose
tool_choice is absent, "auto" or "none" only OFFERS tools, and npu_tool_grammar.h already says "auto" installs no
grammar on the per-op forward either: a plain answer is a correct reply to it. The Lemonade web app offers its 19
tools with every chat, so every NPU chat from the Lemonade page was a 400, and the appliance needed a proxy in front
of lemond that stripped them.
npu_drop_offered_tools removes tools/tool_choice/parallel_tool_calls when the call is only offered, before the
refusal and before the template renders (on the ordered copy too), so the prompt does not carry definitions the
route cannot act on. The handler says so: X-1bit-Tools-Ignored: <n> and a stderr line. tool_choice "required", a
named function, an unknown tool_choice string and a json_schema response_format are still refused as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Part of #3287. Owner ask: the NPU route should ignore tools.
Problem. #3193 made the private NPU route and the layer lane refuse any chat carrying
tools: their generators cannot install a tool grammar, and a demanded call answered as prose is the silently wrong shape. But the Lemonade web app offers its 19 tools with every chat (tool_choiceabsent/auto), so every NPU chat from the Lemonade page was a 400 (…private route cannot carry a tool grammar). The appliance has been running a proxy in front of lemond that strips them; it has to be set up again by hand after each install.Rule. A request that only offers tools (
tool_choiceabsent,"auto"or"none") asks for "a call, or a plain answer".npu_tool_grammar.halready documents that"auto"installs no grammar on the per-op forward either, so a plain answer is a correct reply on every route.tools,tool_choiceabsent /auto/noneX-1bit-Tools-Ignored: <n>+ a stderr linetool_choice: "required"/ a named functiontool_choicestringresponse_formatjson_schemaThe tools are removed before the template renders (on the ordered copy too), so the prompt does not spend NPU prefill on 19 definitions the route cannot act on. That matches what the proxy did, which was measured working on the AI MAX+ 395 tonight (the 0.6B answered "The capital of France is Paris." with a tool list attached).
Tests.
tests/npu_private_route_tools_test.cpp: 9 new cases (offered/auto/none dropped and not refused, required and named kept and refused, unknown string kept,[]untouched, json_schema still refused, the ordered-json copy); all old and new rows pass locally.app/unified.cpppassesg++ -std=c++23 -fsyntax-only. A hardware run on the appliance (Lemonade page chat on the NPU with no proxy) follows once a build carries it.🤖 Generated with Claude Code