continue icon indicating copy to clipboard operation
continue copied to clipboard

Bug: Cannot Parse Response From `deepseek-r1:latest` Correctly in JetBrains

Open zzyu17 opened this issue 9 months ago • 7 comments

Before submitting your bug report

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. Image How should this be fixed?

To reproduce

No response

Log output


zzyu17 avatar Feb 06 '26 20:02 zzyu17

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

continue avatar Feb 06 '26 20:02 continue

@zzyu17 is this a regression which showed up in a recent version or does it fail on older versions for you as well?

RomneyDa avatar Feb 07 '26 03:02 RomneyDa

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?

zzyu17 avatar Feb 07 '26 05:02 zzyu17

Well I just tried a more couple times and found a temporary "solution" to this bug. I did the following two things:

  1. Close the GUI window in my remote server;
  2. Add a snippet configuring completionParser under 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:

Image

zzyu17 avatar Feb 07 '26 06:02 zzyu17

@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

zzyu17 avatar Feb 07 '26 06:02 zzyu17

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.

github-actions[bot] avatar May 27 '26 02:05 github-actions[bot]

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.

github-actions[bot] avatar Jun 07 '26 02:06 github-actions[bot]