Continue.dev contextLength parameter doesn't work for Ollama model
01:18 30 Nov 2025

I'm trying to use Continue.dev with a local model running on Ollama, but keep getting the "file exceeds context length" error.

My config looks like this:

  - name: qwen3-coder
    provider: ollama
    model: qwen3-coder
    apiBase: http://localhost:11434/
    contextLength: 256000
    roles:
      - chat

Even when setting contextLength to an inaccurately large value (2560000), I get the same error on a file that should fit in context (29 KB). The contextLength setting seems to be ignored.

visual-studio-code large-language-model ollama