continuedev / continuedev/continue

Error streaming edit diffs: Token limit reached. File/range likely too large for this edit

Open
#7,544 14 comments 17 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:inline-edit ide:vscode kind:bug os:linux
Dominant language
TypeScript
Stars
36k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Before submitting your bug report
Relevant environment info
- OS: Linux x64 
- Continue version: 1.2.1
- IDE version: VS Code 1.103.2
- Model: `deepseek-r1:8b` via ollama
- `config.yaml`:
  
name: Local Agent
version: 1.0.0
schema: v1
models:
  # DeepSeek with separate no thinking version, because other roles need speed
  - name: DeepSeek-R1 8b Thinking (local)
    provider: ollama
    model: deepseek-r1:8b
    roles: [chat]
    defaultCompletionOptions:
      contextLength: 8192 # 7.5 GB
  - name: DeepSeek-R1 8b NoThink (local)
    provider: ollama
    model: deepseek-r1:8b
    roles: [autocomplete, edit, apply]
    defaultCompletionOptions:
      contextLength: 8192 # 7.5 GB
    requestOptions:
        extraBodyProperties:
          think: false
Description

I can't understand why edit mode doesn't work. I work with very small file, 50 lines. I also have open (in other tabs) 2 other files, also very small. I tried to use Deepseek R1 8B with and without thinking. Neither works... It works properly in the chat mode, even if I copy-paste my code there.

BTW, can't find Continue: Enable Console, can't troubleshoot properly:

Image
To reproduce
  1. Setup ollama with deepseek-r1 8b in Continue
  2. Open my file
  3. Select some code
  4. Use Ctrl+I to invoke the edit mode
  5. Enter my command
  6. It fails :(
Log output
Error output:
> Error streaming edit diffs: Token limit reached. File/range likely too large for this edit

Developer Tools error:

 ERR [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "64bdc51d-2467-4058-a62d-66e79da72427",
    "messageType": "edit/sendPrompt",
    "data": {
      "prompt": "I want to read newest HTML file in the directory",
      "range": {
        "range": {
          "start": {
            "line": 5,
            "character": 0
          },
          "end": {
            "line": 5,
            "character": 83
          }
        },
        "filepath": "file:///home/againpsychox/Public/Tools/CAN/run.ps1",
        "contents": "$pattern = '<tr[^>]*>.*\\n.*\\n.*>(\\d+)<.*\\n.*\\n.*\\n.*\\n.*\\n.*>(\\d+\\.\\d+\\.\\d+\\.\\d+)<'"
      }
    }
  }
}

Error: Error streaming edit diffs: Token limit reached. File/range likely too large for this edit

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 by reproducing the Ctrl+I edit flow with the reported Continue 1.2.1, VS Code, and Ollama configuration, then inspect the Developer Tools log around the edit/sendPrompt message and the streaming edit diffs error. Done means a small selected range can complete an edit without the token-limit failure, with the behavior covered by the relevant existing edit tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
ollama, typescript, vscode
Domain
ai, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.