mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 03:20:02 +08:00
Every tool call in a round has its arguments bound before any of them runs.
`rebinding_tools` is how a capability says "this call repoints the turn, so
run it first and re-bind the rest against the new target" — and mastery
declared two of the three tools that do that. `mastery_mode` was missing,
even though `augment_kwargs` hands it a `_bind_active_mode` binder a few
lines below the declaration.
So in a round holding both, `mastery_mode` landed in the concurrent batch and
`mastery_quiz` kept the mode bound before the switch. Every mode-gated tool
reads `_mastery_session_mode` off that bind, so the quiz was refused for
being in `outline` — in the very round that left `outline`. The refusal then
told the model to "call mastery_mode with mode='study' first", in a round
where `mastery_mode` had already returned `status: switched`.
That round is not a corner case: the prompt asks for it twice ("切完在同一轮
把事做完"), and it is what "继续学" at the end of an outline sitting produces.
The visible result is one of the shapes behind "it asked a question and then
answered it": the tutor streams the lead-in, the card never appears because
the call was refused, and the turn carries on.
`mastery_mode` and mode.py are both new in v1.6.5, so this path is new too.
The other routes to a self-answered question are separate and still open —
mastery declares no `tool_round_output_policy` and does not buffer, so the
posing round's own prose is published unexamined, and `mastery_grade` will
grade an interaction still AWAITING. Both need more than a declaration.