Agents: mount two tools, and set the Maximum Iterations in agent settings to 1-2, toolConfig field error will appear #12258

Closed
opened 2026-02-21 19:06:36 -05:00 by yindo · 3 comments
Owner

Originally created by @ghost on GitHub (Mar 27, 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

Newest

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

Please mount two tools, and set the Maximum Iterations in agent settings to 1-2, and the error will appear.

Error Content:
[bedrock] Error: PluginInvokeError: {"args":{"description":"[models] Error: ValidationException: The toolConfig field must be defined when using toolUse and toolResult content blocks."},"error_type":"InvokeError","message":"[models] Error: ValidationException: The toolConfig field must be defined when using toolUse and toolResult content blocks."}

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @ghost on GitHub (Mar 27, 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 Newest ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/22e54438-e048-406d-a5c8-8e9dae80dda3) **Please mount two tools, and set the Maximum Iterations in agent settings to 1-2, and the error will appear.** **Error Content:** [bedrock] Error: PluginInvokeError: {"args":{"description":"[models] Error: ValidationException: The toolConfig field must be defined when using toolUse and toolResult content blocks."},"error_type":"InvokeError","message":"[models] Error: ValidationException: The toolConfig field must be defined when using toolUse and toolResult content blocks."} ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bugstale labels 2026-02-21 19:06:37 -05:00
yindo closed this issue 2026-02-21 19:06:37 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 27, 2025):

A similar issue has been reported where the error is caused by the toolConfig field not being defined when using toolUse and toolResult content blocks. This is a known problem in Dify v15.0, particularly when using OpenRouter (Sonnet 3.5) [1]. The error occurs when the Maximum Iterations setting is set to a low value, such as 1-2, which limits the number of execution steps the Agent can perform [2].

To resolve this, ensure that the toolConfig field is properly defined for the tools you are using. This configuration is necessary to avoid execution failures and PluginInvokeErrors.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Mar 27, 2025): <!-- Answer --> A similar issue has been reported where the error is caused by the `toolConfig` field not being defined when using `toolUse` and `toolResult` content blocks. This is a known problem in Dify v15.0, particularly when using OpenRouter (Sonnet 3.5) <sup>[[1]](https://github.com/langgenius/dify/issues/12460)</sup>. The error occurs when the Maximum Iterations setting is set to a low value, such as 1-2, which limits the number of execution steps the Agent can perform <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/node/agent.md)</sup>. To resolve this, ensure that the `toolConfig` field is properly defined for the tools you are using. This configuration is necessary to avoid execution failures and PluginInvokeErrors. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/a7522e94-c8c1-4c61-b2df-cba720a5a786?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/a7522e94-c8c1-4c61-b2df-cba720a5a786?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/a7522e94-c8c1-4c61-b2df-cba720a5a786?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/a7522e94-c8c1-4c61-b2df-cba720a5a786?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a7522e94-c8c1-4c61-b2df-cba720a5a786?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/a7522e94-c8c1-4c61-b2df-cba720a5a786?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a7522e94-c8c1-4c61-b2df-cba720a5a786?feedback_type=other)</sup>
Author
Owner

@ghost commented on GitHub (Mar 27, 2025):

By the way, using AWS Bedrock Claude models, like claude 3.5 or 3.7

@ghost commented on GitHub (Mar 27, 2025): By the way, using AWS Bedrock Claude models, like claude 3.5 or 3.7
Author
Owner

@dosubot[bot] commented on GitHub (Apr 28, 2025):

Hi, @GxWwT. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You reported a bug in the Dify platform when using self-hosted Docker.
  • The error occurs in the "toolConfig field" when Maximum Iterations is set to 1-2.
  • I noted this is a known issue in Dify v15.0, especially with OpenRouter (Sonnet 3.5).
  • You mentioned using AWS Bedrock Claude models, which might be relevant.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting here.
  • If no updates are provided, the issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Apr 28, 2025): Hi, @GxWwT. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You reported a bug in the Dify platform when using self-hosted Docker. - The error occurs in the "toolConfig field" when Maximum Iterations is set to 1-2. - I noted this is a known issue in Dify v15.0, especially with OpenRouter (Sonnet 3.5). - You mentioned using AWS Bedrock Claude models, which might be relevant. **Next Steps:** - Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting here. - If no updates are provided, the issue will be automatically closed in 15 days. 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#12258