mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
[PR #2291] [MERGED] fix(cot_agent): remove code block parsing to ensure correct action parsing #2384
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-official-plugins/pull/2291
Author: @whhe
Created: 12/19/2025
Status: ✅ Merged
Merged: 12/24/2025
Merged by: @crazywoola
Base:
main← Head:fix-agent-react-output📝 Commits (2)
57381fffix: remove code block parsing to ensure correct action parsing07c9ca5update cot_agent verion to 0.0.26📊 Changes
2 files changed (+30 additions, -74 deletions)
View changed files
📝
agent-strategies/cot_agent/manifest.yaml(+1 -1)📝
agent-strategies/cot_agent/output_parser/cot_output_parser.py(+29 -73)📄 Description
Related Issues or Context
The current code block recognition logic reads the content between two
```. When a field in the Action JSON contains```, such as a code block in the Final Answer output, the plugin will read the text from the beginning of Action JSON to the beginning of the code block, which is only a part of the entire JSON. Using it to parse the Action will fail, causing the process to terminate immediately and output in an incorrect format.This PR contains Changes to Non-Plugin
This PR contains Changes to Non-LLM Models Plugin
This PR contains Changes to LLM Models Plugin
Version Control (Any Changes to the Plugin Will Require Bumping the Version)
VersionField, Not in Meta Section)Dify Plugin SDK Version
dify_plugin>=0.3.0,<0.6.0is in requirements.txt (SDK docs)Environment Verification (If Any Code Changes)
Local Deployment Environment
SaaS Environment
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.