unsloth/studio/backend/routes
Daniel Han f86d114352 Revert disconnect throttle, reset prev_text on tool_start, restore XML safety net
Addresses all P1 findings from reviewer round 3 (10 reviewers):

1. Revert disconnect check to every iteration (was every 20th).
   All 10 reviewers flagged this as a correctness regression for
   short streams and sparse tool event loops. The cancel watcher in
   llama_cpp.py is the primary mechanism but the route-layer check
   must remain per-iteration for completeness. [10/10]

2. Reset prev_text on tool_start in gguf_tool_stream. When a tool
   cycle begins after visible content was already streamed, the
   route-layer cumulative delta tracker (prev_text) must be reset
   so the post-tool synthesis response is not truncated or dropped.
   [9/10]

3. Remove the _last_emitted gate from the XML safety net. The gate
   was added to prevent retroactive tool execution after visible
   content, but with prev_text now reset on tool_start (#2), the
   root cause is fixed and the safety net can correctly handle
   content-then-tool-XML responses (matching pre-PR behavior).
   [8/10]
2026-03-27 08:55:58 +00:00
..
data_recipe Fix Studio silently exiting on Windows without error output (#4527) 2026-03-22 08:23:03 -07:00
.gitkeep root studio folder 2026-02-02 09:13:49 +00:00
__init__.py feat(studio): training history persistence and past runs viewer (#4501) 2026-03-25 00:58:55 -07:00
auth.py studio: fix stale GGUF metadata, update helper model, auth improvements (#4346) 2026-03-17 01:22:08 -07:00
datasets.py fix: subprocess crash during map operation on Windows (#4507) 2026-03-22 05:21:09 -07:00
export.py Final cleanup 2026-03-12 18:28:04 +00:00
inference.py Revert disconnect throttle, reset prev_text on tool_start, restore XML safety net 2026-03-27 08:55:58 +00:00
models.py feat: multi-source model discovery (HF default, legacy cache, LM Studio) (#4591) 2026-03-25 07:48:04 -07:00
training.py feat(studio): training history persistence and past runs viewer (#4501) 2026-03-25 00:58:55 -07:00
training_history.py feat(studio): training history persistence and past runs viewer (#4501) 2026-03-25 00:58:55 -07:00