Repository navigation
Context meter: user-defined warning threshold in tokens, independent of the model's max window #16089
Frank21777
started this conversation in
Ideas
Replies: 1 comment
|
I'd also want the warning on the chat's row in the sidebar, so I can spot an expensive chat without opening it. I have a working version in my fork if it helps. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Before submitting
Area
apps/web
Problem or use case
The context meter measures usage against the model's maximum window and only changes colour above 90% (
isOverloaded = normalizedPercentage > 90inContextWindowMeter.tsx). With a 1M window that signal arrives far too late to be useful.I keep Claude sessions below roughly 120k tokens, because answer quality drops noticeably beyond that, and then compact or start a new thread manually. At 120k the ring is 12% full and looks the same as at 20k. The only way to notice is to hover every thread regularly.
The existing options do not cover this:
Proposed solution
An optional client setting "Context warning threshold" in tokens, empty by default (current behaviour).
When
usedTokensreaches the threshold, the ring switches to a warning colour and the popover shows the budget next to the usage, e.g.121k used · 120k budget. Above 90% of the real window the existing error colour still wins.Why this matters
Large windows made percentage-of-max a weak proxy for "time to compact". People who manage context deliberately work with an absolute budget, and the meter cannot express one today.
Smallest useful scope
Setting plus colour change on the existing ring. No server or contract changes:
usedTokensalready arrives withcontext-window.updated.Alternatives considered
Risks or tradeoffs
Examples or references
Contribution
All reactions