Reasoning-mode completion against DeepSeek's `deepseek-reasoner` model (R1) via /v1/chat/completions. Surfaces the model's chain-of-thought (`reasoning_content`
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-deepseek-reason-ac980b03bc47 ,按照其中的说明把「deepseek-reason」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Wraps DeepSeek's reasoning model so ruflo callers can get an explicit
chain-of-thought back with the final answer, without having to parse it
out of the message content. Same subprocess-invocation shape as the sibling
deepseek-chat skill.
deepseek-chat.Implementation: scripts/reason.mjs.
DEEPSEEK_API_KEY from env. Degrade gracefully when missing./v1/chat/completions with { model: 'deepseek-reasoner', messages, max_tokens? }.
Per DeepSeek's docs, temperature/top_p are ignored for reasoner
models — this script does not forward them.choices[0].message.content AND choices[0].message.reasoning_content.reasoning; table mode omits it unless
--show-reasoning is passed.reasoningTokens (from usage.completion_tokens_details.reasoning_tokens)
is surfaced separately so callers can attribute cost.node plugins/ruflo-deepseek-harness/scripts/reason.mjs \
--prompt "Prove that sqrt(2) is irrational." \
--format table --show-reasoning
Table output shows the reasoning block, then the answer. JSON mode returns:
{
"status": "ok",
"model": "deepseek-reasoner",
"content": "sqrt(2) is irrational because …",
"reasoning": "Assume for contradiction that sqrt(2) = p/q in lowest terms …",
"finishReason": "stop",
"usage": {
"promptTokens": 14,
"completionTokens": 812,
"reasoningTokens": 640,
"totalTokens": 826
}
}