Bug: Cannot Parse Response From `deepseek-r1:latest` Correctly in JetBrains
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
- [x] I'm not able to find a related conversation on GitHub discussions that reports the same bug
- [x] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Windows 10 22H2
- Server OS: MacOS 15.3 (24D2059)
- Continue version: 1.0.59
- IDE version: PyCharm 2025.3.1.1
- Ollama version: 0.15.5
- Model: deepseek-r1:latest
- config:
name: Local Assistant
version: 1.0.0
schema: v1
models:
- name: deepseek-r1:latest
provider: ollama
model: deepseek-r1:latest
apiBase: http://[server-ip]:11434
roles:
- chat
- edit
- apply
- rerank
- autocomplete
context:
- provider: code
- provider: docs
- provider: diff
- provider: terminal
- provider: problems
- provider: folder
- provider: codebase
Description
When using chat mode in Pycharm with deepseek-r1:latest, deployed on ollama on a remote MacOS server, Continue fails to parse the response correctly and return only the thinking contents.
How should this be fixed?
To reproduce
No response
Log output
Related issues:
- #5992 - Support configurable thinking output formats
- #3901 - think tags (DeepSeek R1 via Ollama,
tags stripped) - #9102 - Not able to disable thinking mode for self hosted models using OpenAI provider
- #8990 - Edit mode with gpt-oss-120b inserts reasoning text into file
@zzyu17 is this a regression which showed up in a recent version or does it fail on older versions for you as well?
It showed up in a recent (actually the lastest) version of Continue, Pycharm and ollama. But I hanven't try it on an older version. Should I give it a try?
Well I just tried a more couple times and found a temporary "solution" to this bug. I did the following two things:
- Close the GUI window in my remote server;
- Add a snippet configuring
completionParserunder the model in local config as follows:
name: Local Assistant
version: 1.0.0
schema: v1
models:
- name: deepseek-r1:latest
provider: ollama
model: deepseek-r1:latest
apiBase: http://100.108.196.57:11434
roles:
- chat
- edit
- apply
- rerank
- autocomplete
completionParser: |
(data: string) => {
const parsed = JSON.parse(data);
return parsed.message.content;
}
context:
- provider: code
- provider: docs
- provider: diff
- provider: terminal
- provider: problems
- provider: folder
- provider: codebase
The result is sometimes it worked but sometimes didn't, and I can't figure out when it will work and when it won't. When it works, it shows the response like:
@RomneyDa Also I found when it worked, it might mess up the question and response, and the response might repeat exactly the same as the former one.
https://github.com/user-attachments/assets/47b69bf1-30cb-4c64-8aa7-2be3eee56999
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, you are welcome to leave a comment and this will keep the issue open. However please note that this repo is no longer being actively maintained.