You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: restore the context usage meter on CLI 1.1.21 and keep the chosen context-window tier (#27)
* fix: read the CLI 1.1.21 context-usage response shape
qodercli 1.1.21 changed the get_context_usage control response from
flat token counts (totalTokens/maxTokens/rawMaxTokens/percentage) to
a percentage-based shape (contextWindow.usedPercentage, categories,
tokenCountsAvailable). The turn tracker kept reading the old fields,
so every lookup came back undefined and the context usage meter was
stuck at its "appears after the first response" placeholder.
Parse the new shape: percentage drives the meter directly, absolute
token counts are used when the CLI reports them (tokenCountsAvailable),
and window size falls back to the previous turn or the model catalog.
Router tests now mock the new wire shape.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
* fix: keep the chosen context-window tier in the usage meter
The post-response context-usage refresh fell back to the model catalog
default window whenever the CLI omitted maxTokens, so a tier chosen in
the per-model editor (such as 400K) reverted to the default (200K)
after the first message. Route the effective per-model context window
into the turn tracker and prefer it over the catalog fallback when the
CLI reports no absolute window.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
---------
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
0 commit comments