[PR #278] fix: close <think> block only when reasoning_content is None #280

Open
opened 2026-02-15 21:16:33 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/278
Author: @utsumi-fj
Created: 1/8/2026
Status: 🔄 Open

Base: mainHead: fix_multiple_think_tag


📝 Commits (1)

  • e7d9e0a fix: close <think> block only when reasoning_content is None

📊 Changes

2 files changed (+12 additions, -14 deletions)

View changed files

📝 python/dify_plugin/interfaces/model/large_language_model.py (+2 -3)
📝 python/tests/interfaces/model/test_wrap_think.py (+10 -11)

📄 Description

Fixes #277

Compatibility Check

  • I have checked whether this change affects the backward compatibility of the plugin declared in README.md
  • I have checked whether this change affects the forward compatibility of the plugin declared in README.md
  • If this change introduces a breaking change, I have discussed it with the project maintainer and specified the release version in the README.md
  • I have described the compatibility impact and the corresponding version number in the PR description
  • I have checked whether the plugin version is updated in the README.md

Compatibility impact

Since this is a bug fix, there is no compatibility impact.

Available Checks

  • Code has passed local tests
  • Relevant documentation has been updated (if necessary)

Before

before

After

after

🔄 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-plugin-sdks/pull/278 **Author:** [@utsumi-fj](https://github.com/utsumi-fj) **Created:** 1/8/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix_multiple_think_tag` --- ### 📝 Commits (1) - [`e7d9e0a`](https://github.com/langgenius/dify-plugin-sdks/commit/e7d9e0adce17c854e13694e025c977bd1afaaf3e) fix: close `<think>` block only when `reasoning_content` is None ### 📊 Changes **2 files changed** (+12 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `python/dify_plugin/interfaces/model/large_language_model.py` (+2 -3) 📝 `python/tests/interfaces/model/test_wrap_think.py` (+10 -11) </details> ### 📄 Description Fixes #277 ## Compatibility Check - [x] I have checked whether this change affects the **backward compatibility** of the plugin declared in `README.md` - [x] I have checked whether this change affects the **forward compatibility** of the plugin declared in `README.md` - [x] If this change introduces a breaking change, I have discussed it with the project maintainer and specified the release version in the `README.md` - [x] I have described the compatibility impact and the corresponding version number in the PR description - [ ] I have checked whether the plugin version is updated in the `README.md` ## Compatibility impact Since this is a bug fix, there is no compatibility impact. ## Available Checks - [x] Code has passed local tests - [ ] Relevant documentation has been updated (if necessary) ## Before <img width="1671" height="863" alt="before" src="https://github.com/user-attachments/assets/e10ee43c-6369-4af5-966a-c264a7b039eb" /> ## After <img width="1671" height="863" alt="after" src="https://github.com/user-attachments/assets/7ef19679-0753-4b93-a145-0aa345bc3e80" /> --- <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-15 21:16:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-sdks#280