A server still running a deprecated sampling tool loop caps it at five iterations. On the fifth sampling request it sets toolChoice to {mode: "none"}. What does that setting do?
Select an answer to reveal the explanation.
Short Explanation
Think of "none" as you, the referee, blowing the final whistle. The model can't reach for any more tools, so it has to wrap up with an answer. Don't mix it up with "auto," which is the default, or "required," which does the opposite.
Full Explanation
In sampling with tools, the server supplies a tools array and an optional toolChoice. Mode auto lets the model decide whether to use tools and is the default; mode required means the model must use at least one tool before completing; mode none means the model must not use any tools. The sampling specification describes exactly this loop pattern: a server executes requested tool uses, sends a new sampling request with the results appended, may cap the number of iterations, and can pass toolChoice mode none on the last iteration to force a final result. Saying none lets the model decide describes auto, the default. Saying it forces at least one tool call describes required, which would push the loop further rather than closing it. Saying it clears the tools array and triggers a tools/list reload fails by concept: tools in a sampling request are scoped to that request and need not match the server's registered tools, and toolChoice controls model behaviour, not client tool discovery. Exam caveat: both parties should implement iteration limits for tool loops, and every assistant tool use must be answered by a user message containing only matching tool results. Sampling is deprecated in this revision. Operational check: send a final request with mode none and confirm stopReason is endTurn with no tool uses.