Skip to content

feat: add reasoning content to AI conversation records and update related components#1530

Merged
LinkinStars merged 5 commits into
apache:devfrom
hgaol:1524
May 30, 2026
Merged

feat: add reasoning content to AI conversation records and update related components#1530
LinkinStars merged 5 commits into
apache:devfrom
hgaol:1524

Conversation

@hgaol

@hgaol hgaol commented May 21, 2026

Copy link
Copy Markdown
Member

Fix #1524

Root cause

DeepSeek's reasoning models stream reasoning_content alongside content. Answer ignored it, so follow-up requests failed with 400: The reasoning_content in the thinking mode must be passed back to the API, and the thinking text was never shown or saved.

Fix

  • Capture reasoning_content from the stream and pass it back to theAPI on subsequent rounds.
  • Persist it with the conversation (new DB column via migrationv2.0.2).
  • Render it in the chat UI as a collapsible "Thinking…/Thoughts"panel above the answer.

Compatibility

Nullable column, omitempty field, UI hides the panel when empty — old conversations and non-reasoning models behave exactly as before.

Demo

Screen.Recording.2026-05-21.at.22.28.56.mov
@LinkinStars LinkinStars self-requested a review May 22, 2026 02:45
@LinkinStars LinkinStars self-assigned this May 22, 2026
@LinkinStars LinkinStars requested a review from robinv8 May 26, 2026 10:59
@LinkinStars LinkinStars deleted the branch apache:dev May 30, 2026 05:50
@LinkinStars LinkinStars reopened this May 30, 2026
@LinkinStars

Copy link
Copy Markdown
Member

@hgaol This branch has conflicts that must be resolved. Once the conflicts are resolved, we will merge this PR.

@LinkinStars LinkinStars added this to the v2.0.2 milestone May 30, 2026
# Conflicts:
#	ui/src/components/BubbleAi/index.tsx
@hgaol hgaol requested a review from LinkinStars May 30, 2026 07:30
@LinkinStars LinkinStars merged commit 7c210a4 into apache:dev May 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants