continuedev / continuedev/continue
Error streaming edit diffs: Token limit reached. File/range likely too large for this edit
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Before submitting your bug report
- I've tried using the "Ask AI" feature on the Continue docs site to see if the docs have an answer
- I believe this is a bug. I'll try to join the Continue Discord for questions
- I'm not able to find an open issue that reports the same bug
- I've seen the troubleshooting guide on the Continue Docs
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:
To reproduce
- Setup ollama with
deepseek-r1 8bin Continue - Open my file
- Select some code
- Use
Ctrl+Ito invoke the edit mode - Enter my command
- 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
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 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