Custom Models Set The Context Window to 1M

Hey, thanks for the detailed write-up. You described the local model case exactly right. You’re right that the problem is basically the mirror image of the usual one. You don’t need to raise the context window, you need to lower the assumed window to match what your hardware can actually handle, and the current default of 1M for custom OpenAI-compatible models outside our catalog doesn’t allow that.

I can confirm the current behavior. For those models we set 1M as a safe upper bound, there’s no auto-detect of the real context window from the provider, and there’s also no UI yet to set the context window manually for a custom model. That’s why auto-compaction triggers against the wrong limit. For a local model with a 32K window, the prompt hits the real limit before compaction has time to kick in.

This is a known limitation. It’s not a bug in the sense of a regression, it’s a missing capability, and I can’t share an ETA for when the setting will be available. The most helpful thing you can do right now is add your case (local Ollama, num_ctx 32K, the “need to lower the window, not raise it” scenario) to the relevant feature request: Unlock Full Context Window with Own API Keys. Specific setups like yours, plus a breakdown of how Continue, Zed, and Cline handle this, really helps us prioritize.

I get that for a local workflow this is a blocker, not just a wishlist item. I’ll note it that way.