Description
I am using opencode with the GLM-5 model. According to the features/documentation, opencode should support automatic context compression/summarization when the conversation history or input size grows large.
However, I encountered an API error indicating that the input token count exceeds the model's limit, suggesting that the auto-compression mechanism either did not trigger or failed to reduce the context sufficiently.
Plugins
No response
OpenCode version
1.1.15
Steps to reproduce
Initialize opencode with the GLM-5 model configuration.
Start a long-running conversation session (e.g., iterating on a large codebase or analyzing multiple files).
Monitor the context usage until it reaches approximately 170,000 tokens.
At this stage, trigger an action that requires tool usage (e.g., file edit, search) or subagent invocation.
Observe the API error: Request ... input tokens exceeds the model's maximum context length.
Screenshot and/or share link
No response
Operating System
windows 11
Terminal
windows terminal
Description
I am using
opencodewith theGLM-5model. According to the features/documentation,opencodeshould support automatic context compression/summarization when the conversation history or input size grows large.However, I encountered an API error indicating that the input token count exceeds the model's limit, suggesting that the auto-compression mechanism either did not trigger or failed to reduce the context sufficiently.
Plugins
No response
OpenCode version
1.1.15
Steps to reproduce
Initialize opencode with the GLM-5 model configuration.
Start a long-running conversation session (e.g., iterating on a large codebase or analyzing multiple files).
Monitor the context usage until it reaches approximately 170,000 tokens.
At this stage, trigger an action that requires tool usage (e.g., file edit, search) or subagent invocation.
Observe the API error: Request ... input tokens exceeds the model's maximum context length.
Screenshot and/or share link
No response
Operating System
windows 11
Terminal
windows terminal