Files
DeepTutor/deeptutor/agents
zszz3 8819d95c21 fix: keep the loop's tools in forced final rounds
When a research block or a deep_question explore/quiz loop runs out of
rounds, the forced FINISH request was sent with no tools. Removing the
tools changes the first bytes of the request, so none of the block's
history is served from the provider cache. In a real deep_research run a
block's forced finish paid 28.6k and 279.8k uncached tokens.

The forced rounds now send the loop's tool schemas unchanged; the prompt
already tells the model to stop calling tools. tool_choice="none" is not
used because DeepSeek renders it like no tools (replayed: 1,152 cached
tokens with "none" or no tools, 14,976 with the tools left as they were).
A tool call in a forced round is not dispatched; it fails the attempt and
gets the existing repair note.

Refs #2974
2026-11-30 03:47:50 +08:00
..
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00