microsoft / microsoft/copilot-for-eclipse

[Bug] Context window size not handled correctly for Ollama models

Open
#411 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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:

  1. Select local model, e.g. qwen3.5:latest
  2. Start conversation with Copilot, context shows 256K in the UI.
  3. Execute ollama ps in the console, which shows 4096 as CONTEXT.
  4. Keep talking to Copilot until you have filled up the 4K.
  5. 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.

Image

And the message that we ran out of context, as Copilot cannot remember anything anymore:

Image

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.