The issue occurs when registering GLM-5.2 as a custom OpenAI-compatible model in Cursor. GLM-5.2 is advertised by Z.AI as supporting a usable 1M context window, but Cursor appears to show or use only a 200K context window. Cursor still works, but this prevents me from using the full advertised context capacity of the model.
Hey, thanks for the report. This isn’t a bug, it’s a current design limitation.
For custom OpenAI-compatible models that aren’t in our catalog, Cursor uses a fixed default context. Right now we can’t auto-detect the real context window from the provider side (in your case, Z.AI), and there’s no UI to set it manually. That’s why the advertised 1M for GLM-5.2 isn’t picked up.
Being able to set the context window for custom models manually is a valid request, and it’s being tracked here: Unlock Full Context Window with Own API Keys. Please add your GLM-5.2 case there. The more specific the setup details are, the better it is for prioritization. I can’t share an ETA for this option yet.