cannot handle claude tool-use response #121

Closed
opened 2026-02-16 10:18:09 -05:00 by yindo · 6 comments
Owner

Originally created by @czx2zch on GitHub (Mar 26, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.1.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

hi
now,i use bing search tool with LLM(claude 3.7 sonnet),it response error。

✔️ Expected Behavior

it will be nomarl running

Actual Behavior

some error happened,error:

[bedrock] Error: PluginlnvokeError: {"args":
{"description":"An error occurred
(validationException) when calling the
ConverseStream operation: The model returned the
following errors: messages.1.content.0.type: Expected
thinking or redacted thinking, but found
tool use.When thinkingis enabled, a final assistantmessage must start with a thinking block
(preceeding the lastmost set of tool useand
tool resultblocks).We recommend you include thinking blocks from previous turns. To avoid this requirement,disablethinking."},"error_type":"InvokeError","message":"Ar error occurred (validationException) when calling the ConverseStream operation: The model returned the following errors: messages.1.content.0.type: Expected thinkingor redacted thinking, but found
tool use.when thinkingis enabled, a final
assistantmessage must start with a thinking block (preceeding the lastmost set of tool useand
tool resultblocks).We recommend you include thinking blocks from previous turns, To avoid this requirement, disablethinking`."}

Originally created by @czx2zch on GitHub (Mar 26, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.1.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce hi now,i use bing search tool with LLM(claude 3.7 sonnet),it response error。 ### ✔️ Expected Behavior it will be nomarl running ### ❌ Actual Behavior some error happened,error: [bedrock] Error: PluginlnvokeError: {"args": {"description":"An error occurred (validationException) when calling the ConverseStream operation: The model returned the following errors: messages.1.content.0.type: Expected thinking or `redacted thinking`, but found tool use`.When `thinking`is enabled, a final assistant`message must start with a thinking block (preceeding the lastmost set of `tool use`and tool result` blocks).We recommend you include thinking blocks from previous turns. To avoid this requirement,disable `thinking`."},"error_type":"InvokeError","message":"Ar error occurred (validationException) when calling the ConverseStream operation: The model returned the following errors: messages.1.content.0.type: Expected thinking`or `redacted thinking`, but found tool use`.when thinking`is enabled, a final assistant`message must start with a thinking block (preceeding the lastmost set of tool use`and tool result` blocks).We recommend you include thinking blocks from previous turns, To avoid this requirement, disable `thinking`."}
yindo closed this issue 2026-02-16 10:18:09 -05:00
Author
Owner

@czx2zch commented on GitHub (Mar 26, 2025):

this is the error image:

Image

@czx2zch commented on GitHub (Mar 26, 2025): this is the error image: ![Image](https://github.com/user-attachments/assets/83f134bc-4e50-4ef8-92b4-4ec8f9e1f816)
Author
Owner

@fdb02983rhy commented on GitHub (Mar 26, 2025):

Whats your plugin version?

@fdb02983rhy commented on GitHub (Mar 26, 2025): Whats your plugin version?
Author
Owner

@czx2zch commented on GitHub (Mar 26, 2025):

Whats your plugin version?

i tried some plugin,all error。
such as:langgenius/bing 0.0.4

@czx2zch commented on GitHub (Mar 26, 2025): > Whats your plugin version? i tried some plugin,all error。 such as:langgenius/bing 0.0.4
Author
Owner

@fdb02983rhy commented on GitHub (Mar 26, 2025):

Sorry I meant your Anthropic plugin version

@fdb02983rhy commented on GitHub (Mar 26, 2025): Sorry I meant your Anthropic plugin version
Author
Owner

@tang2554 commented on GitHub (Jun 8, 2025):

same error, langgenius/bedrock 0.0.24

@tang2554 commented on GitHub (Jun 8, 2025): same error, langgenius/bedrock 0.0.24
Author
Owner

@dosubot[bot] commented on GitHub (Aug 20, 2025):

Hi, @czx2zch. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported a validation error in Dify v1.1.1 when using the Bing search tool with Claude 3.7 Sonnet LLM.
  • The model expects a "thinking" block but instead receives a "tool use" block, causing the error.
  • Other users confirmed the same issue with langgenius/bedrock 0.0.24.
  • The core problem is the need to support or disable thinking blocks for Claude tool-use responses.
  • The issue remains unresolved with no fix implemented yet.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of dify-official-plugins by commenting here.
  • If I do not hear back within 5 days, this issue will be automatically closed.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 20, 2025): Hi, @czx2zch. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported a validation error in Dify v1.1.1 when using the Bing search tool with Claude 3.7 Sonnet LLM. - The model expects a "thinking" block but instead receives a "tool use" block, causing the error. - Other users confirmed the same issue with langgenius/bedrock 0.0.24. - The core problem is the need to support or disable thinking blocks for Claude tool-use responses. - The issue remains unresolved with no fix implemented yet. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of dify-official-plugins by commenting here. - If I do not hear back within 5 days, this issue will be automatically closed. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#121