simonw / simonw/llm

[feature request] Add support for Chain of Thought (CoT) from deepseek-r1

Open
#722 0 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12.5k
Forks
998
Avg merge
6d 12h
Merged PRs (30d)
15

Description

Hello everyone, I think the CoT of deepseek-r1 is significantly helpful for users to understand how the model solves the problem and can help us overcome the LLM hallucinations to some extent.

Currently the llm CLI just print the final output from llm, I think it's a cool feature if the cli can print the CoT.

According to the official document of Deepseek, the CoT is stored by the reasoning_content, which is at the same level as the content field, just like below:

reasoning_content = response.choices[0].message.reasoning_content
content = response.choices[0].message.content

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

No file or test is named; start by locating the llm CLI's response parsing and output entry point, using DeepSeek's official API example and its reasoning_content field as the reference. Done means the CLI prints the CoT as well as the final content.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.