[PR #459] [MERGED] Refactor reasoning content formatting in BedrockLargeLanguageModel #1378

Closed
opened 2026-02-16 10:22:46 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-official-plugins/pull/459
Author: @fdb02983rhy
Created: 3/14/2025
Status: Merged
Merged: 3/14/2025
Merged by: @crazywoola

Base: mainHead: Refactor-render-reasoning-content-formatting-in-BedrockLargeLanguageModel


📝 Commits (1)

  • 2e25190 Refactor reasoning content formatting in BedrockLargeLanguageModel

📊 Changes

1 file changed (+23 additions, -5 deletions)

View changed files

📝 models/bedrock/models/llm/llm.py (+23 -5)

📄 Description

  • Updated reasoning content formatting to use opening and closing tags for the first block.
  • Simplified subsequent block handling by removing unnecessary tags.
  • Ensured proper closing of reasoning tags when content blocks are processed.
  • Maintained code consistency by updating full assistant content handling.

Before

image

After

image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-official-plugins/pull/459 **Author:** [@fdb02983rhy](https://github.com/fdb02983rhy) **Created:** 3/14/2025 **Status:** ✅ Merged **Merged:** 3/14/2025 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `Refactor-render-reasoning-content-formatting-in-BedrockLargeLanguageModel` --- ### 📝 Commits (1) - [`2e25190`](https://github.com/langgenius/dify-official-plugins/commit/2e25190f2c75f9c7eb4127cb572072a76d08ec72) Refactor reasoning content formatting in BedrockLargeLanguageModel ### 📊 Changes **1 file changed** (+23 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `models/bedrock/models/llm/llm.py` (+23 -5) </details> ### 📄 Description - Updated reasoning content formatting to use opening and closing tags for the first block. - Simplified subsequent block handling by removing unnecessary tags. - Ensured proper closing of reasoning tags when content blocks are processed. - Maintained code consistency by updating full assistant content handling. # Before <img width="644" alt="image" src="https://github.com/user-attachments/assets/d9c6b3d4-1139-4116-8094-0c6088a41d6e" /> # After <img width="651" alt="image" src="https://github.com/user-attachments/assets/6c63260e-fb43-47e5-b3eb-5e30ed647171" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 10:22:46 -05:00
yindo closed this issue 2026-02-16 10:22:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#1378