spring-projects / spring-projects/spring-ai

Output of reasoning_content that supports deepseek-r1 is required

Open
#2,283 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

deepseek
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 7h
Merged PRs (30d)
6

Description

Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested.

Expected Behavior
ChatModel.stream(xxx)
.flatMapSequential(f -> {
System.out.println(f.getResult().getOutput().getContent());
// Output reasoning_content
System.out.println(f.getResult().getOutput().getReasoningContent());
})

Current Behavior

ChatModel.stream(xxx)
.flatMapSequential(f -> {
// Output reasoning_content is not supported
System.out.println(f.getResult().getOutput().getContent());
})

Context

When launching LLM Q&A using ChatModel, the thinking response of deepseek-r1 will be output in reasoning_content. Currently, there is only content field in Message output. Unable to receive LLM's thinking, want to add related fields.

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

Start by tracing the ChatModel.stream API and the Message output object described in the examples. Then inspect how DeepSeek responses are represented and streamed, focusing on where content is currently exposed. Done means callers can receive reasoning_content alongside content when using deepseek-r1, with coverage for the streaming behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ai
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.