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
{{ message }}
Repository navigation
Statusline context percentage incorrect for Sonnet 4 #666
When using the statusline, the context percentage is showing very low, for example, the context could be shown as 130,000 tokens but the percentage could be 13%.
On inspection of the code, it looks just the litellm max_input_tokens is used verbatim. However, this is only available on the API usage and not the plan usage. Maybe we need to do a check for what plan is being used (if thats available or can be configured)
I believe its the same model and model id etc, however it seems if you use the API you have access to a 1000000 token window, however if you're on a plan, you only have access to a 200000 context window.
The current statusline still relies on hookData.context_window.total_input_tokens, which can diverge from /context and the actual current usage. That problem is covered by #823, and #923 is the active PR direction for fixing it, so I am closing this as a duplicate.
When using the statusline, the context percentage is showing very low, for example, the context could be shown as 130,000 tokens but the percentage could be 13%.