Skip to content

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

@AgainPsychoX

Description

@AgainPsychoX

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:inline-editRelates to the auto refactor featureide:vscodeRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behavioros:linuxHappening specifically on Linux

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions