microsoft / microsoft/copilot-for-eclipse
[Bug] Context window size not handled correctly for Ollama models
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 126
- Forks
- 60
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 5
Description
Environment
- OS: Windows 11
- Eclipse Version: 0.43
- Plugin Version: 0.21
Describe the bug
Copilot shows for my local model that the context window size is 256K, but Ollama reports 4K. Also after 4K Copilot runs out of context.
To Reproduce
Steps to reproduce the behavior:
- Select local model, e.g.
qwen3.5:latest - Start conversation with Copilot, context shows 256K in the UI.
- Execute
ollama psin the console, which shows4096asCONTEXT. - Keep talking to Copilot until you have filled up the 4K.
- Message appears:
I don't have context from a previous turn in this conversation. What were you working on? Please share the task or file you'd like me to continue with.
Expected behavior
I would expect one of the two following things:
- Ideally: Copilot runs the Ollama model with its maximum context window size. Seemingly the plugin is already reading this information from the Ollama API Reference, as it already shows the 256K.
- At least: Copilot shows the correct context window size, so the user knows that he / she has to change it in Ollama (e.g. via modelfile and setting the default context window size for the model).
Screenshots
The context which shows 256K (is 262,1K a rounding issue?) as well that I exceeded 4K.
And the message that we ran out of context, as Copilot cannot remember anything anymore:
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the local-model selection and the Ollama API Reference, then reproduce the issue using qwen3.5:latest and compare the UI's context value with ollama ps, which reports 4096. Done means the plugin either runs the model with its maximum context window or displays the actual configured context size instead of 256K.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, ollama
- Domain
- ai, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100