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
sglang token exedeeded count is not being recognized for auto compact #25231
Bad Request: Requested token count exceeds the model's maximum context length of 202752 tokens. You requested a total of 202941 tokens: 170941 tokens from the input messages and 32000 tokens for the completion.
Please reduce the number of tokens in the input messages or the completion to fit within the limit.
That's what sglang is returning
Plugins
No response
OpenCode version
1.14.30
Steps to reproduce
exceed context length in open code on an sglang (openai compatible). open code does not recover.
If your issue is specific to sglang's OpenAI-compatible endpoint returning this error shape (as opposed to a standard context_length_exceeded code), feel free to clarify that distinction so it can be tracked separately.
Activity
github-actions commentedon May 1, 2026
This issue might be a duplicate of existing issues. Please check:
context_length_exceedederrors still occur and compaction does not trigger.If your issue is specific to sglang's OpenAI-compatible endpoint returning this error shape (as opposed to a standard
context_length_exceededcode), feel free to clarify that distinction so it can be tracked separately.Arjxm commentedon May 1, 2026
I love to work on this
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.