[PR #479] [MERGED] Fix anthropic thinking mode with tool use chat history arrangement #1392

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

📋 Pull Request Information

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

Base: mainHead: fix-anthropic-thinking-mode-with-tool-use-chat-history-arrangement


📝 Commits (2)

📊 Changes

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

View changed files

📝 models/anthropic/manifest.yaml (+1 -1)
📝 models/anthropic/models/llm/llm.py (+1 -1)

📄 Description

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

The message history should maintain:
Assistant message with tool_use
User message with tool_result

But instead it's creating:
Assistant message with thinking + tool_use + text (duplicating the content)
User message with tool_result

image 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/479 **Author:** [@fdb02983rhy](https://github.com/fdb02983rhy) **Created:** 3/18/2025 **Status:** ✅ Merged **Merged:** 3/18/2025 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `fix-anthropic-thinking-mode-with-tool-use-chat-history-arrangement` --- ### 📝 Commits (2) - [`96ec866`](https://github.com/langgenius/dify-official-plugins/commit/96ec866a79860f1194b154912953a5e10abac599) Update llm.py - [`95131a6`](https://github.com/langgenius/dify-official-plugins/commit/95131a67648f588177cf3b0f6cfc585af604a863) Update manifest.yaml ### 📊 Changes **2 files changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `models/anthropic/manifest.yaml` (+1 -1) 📝 `models/anthropic/models/llm/llm.py` (+1 -1) </details> ### 📄 Description Fixes: https://github.com/langgenius/dify/issues/16082 The message history should maintain: Assistant message with tool_use User message with tool_result But instead it's creating: Assistant message with thinking + tool_use + text (duplicating the content) User message with tool_result <img width="784" alt="image" src="https://github.com/user-attachments/assets/38b53b70-5dd2-474a-bb13-ae88cd40eadb" /> <img width="770" alt="image" src="https://github.com/user-attachments/assets/3e8baa0f-ff8d-45a7-b627-be2a2e441634" /> --- <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:49 -05:00
yindo closed this issue 2026-02-16 10:22:49 -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#1392