[PR #30083] fix: missing content if assistant message with tool_calls #32674

Closed
opened 2026-02-21 20:51:51 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/30083

State: closed
Merged: Yes


Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Fixes https://github.com/langgenius/dify/issues/30063

Screenshots

Before After
图片 图片
图片 图片
图片 图片

These models with non-thinking still ok

图片 图片 图片

Other thinking models still ok

图片 图片

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/30083 **State:** closed **Merged:** Yes --- > [!IMPORTANT] > > 1. Make sure you have read our [contribution guidelines](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) > 1. Ensure there is an associated issue and you have been assigned to it > 1. Use the correct syntax to link this PR: `Fixes #<issue number>`. ## Summary <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. --> Fixes https://github.com/langgenius/dify/issues/30063 - Root cause:These multi-turn thinking models(enable thinking) requires assistant message with `reasoning_content` filled back to LLM. - Solution: we should ensure content not missing,write back to plugin,plugin has extract reasoning_content from <think> via my plugin PRs. https://github.com/langgenius/dify-official-plugins/pull/2298 https://github.com/langgenius/dify-official-plugins/pull/2307 ## Screenshots | Before | After | |--------|-------| | <img width="1220" height="690" alt="图片" src="https://github.com/user-attachments/assets/57f34e50-4a63-4ba8-b4da-e54d168c9880" /> | <img width="1240" height="651" alt="图片" src="https://github.com/user-attachments/assets/f7a9a3b5-1551-49d1-808a-f73f0433fbba" /> | |<img width="1269" height="670" alt="图片" src="https://github.com/user-attachments/assets/b873d6eb-7ed9-4e93-9e92-332229b9af1d" />|<img width="1190" height="651" alt="图片" src="https://github.com/user-attachments/assets/08b75653-52f6-470b-9a26-e63fdca86fbd" />| |<img width="1225" height="760" alt="图片" src="https://github.com/user-attachments/assets/6b36395a-287e-4a65-b51e-449abb163254" />|<img width="1251" height="745" alt="图片" src="https://github.com/user-attachments/assets/20577a8b-1acb-45aa-be97-8892a32d31f0" />| ## These models with non-thinking still ok <img width="1219" height="580" alt="图片" src="https://github.com/user-attachments/assets/42cdf85d-ad78-4452-99df-17c5b6f1e473" /> <img width="1236" height="581" alt="图片" src="https://github.com/user-attachments/assets/64dc3efa-005a-45b1-b1ef-781de4559085" /> <img width="1230" height="616" alt="图片" src="https://github.com/user-attachments/assets/5125d28b-892b-4d43-a558-3bab807e9b71" /> ## Other thinking models still ok <img width="1241" height="640" alt="图片" src="https://github.com/user-attachments/assets/2a99972e-6ddb-484d-b11b-a02690532518" /> <img width="1229" height="710" alt="图片" src="https://github.com/user-attachments/assets/b90964a9-aaf3-4786-a63b-64d8f3fde971" /> ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:51:51 -05:00
yindo closed this issue 2026-02-21 20:51:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#32674