Repository navigation
Studio: recount tokens when status sync adopts a resident GGUF - #10467
Conversation
|
Confirmed the recount in use-chat-model-runtime.ts is still gated on an empty params.checkpoint on main, so a local model loaded through the API leaves the context bar blank until the next completion, which matches #10337. Will get this reviewed. |
|
Review record for #10467, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#400. Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found. Round 1: reviewed mirror
|
The status poll in
use-chat-model-runtime.tsonly calledrefreshContextUsageafter adopting a resident GGUF whenparams.checkpointwas empty (#10337). A local model loaded via API while Studio already had that checkpoint selected never took that path, so the bar stayed blank until the next completion.The empty-checkpoint guard is gone. A blank bar with a known window and an active thread is enough, same as
loadModel's already-resident tail..venv/bin/python -m pytest -q tests/studio/test_new_chat_context_recount.py::test_status_poll_adoption_reprices_when_a_local_checkpoint_is_already_selectedpassed. Replacinguse-chat-model-runtime.tswithupstream/mainfailedassert 0 == 1oncounts.Before / after
Same thread, Qwen3-0.6B GGUF already selected in Studio and loaded again through the API, tab refocused. On the merge base the context bar stays blank (no token count); with this PR it shows
37 / 4.1k.