mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
[PR #2063] [FixBug] Bedrock anthropic max iterations exceeded error #2236
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/2063
Author: @noproblem520
Created: 11/14/2025
Status: 🔄 Open
Base:
main← Head:fix/Agent_Max_Round_Exceeded_Error📝 Commits (1)
4689d0efully fix Agent Node Max Round Exceeded Issue📊 Changes
2 files changed (+25 additions, -4 deletions)
View changed files
📝
models/bedrock/manifest.yaml(+1 -1)📝
models/bedrock/models/llm/llm.py(+24 -3)📄 Description
Related Issues or Context
I saw 2068 has been partially fixed this issue, we still need to tell LLM to summarize the information gathering from previous tool calls, otherwise it will still call

__no_more_tools_available__.Fix https://github.com/langgenius/dify/issues/27428
Fix https://github.com/langgenius/dify/issues/27215
Fix https://github.com/langgenius/dify/issues/17545
--- Old: 2068 has fixed partial problems based on this PR---
Issues
When we use bedrock anthropic models, there's a limitation「The toolConfig field must be defined when using toolUse and toolResult content blocks.」.
function_calling.pywill empty the tools that agents can use in the last round, this logic is fine but violates the limitation of bedrock anthropic models.Reproduce
We can easily reproduce the error by setting max_iterations to 2. If agent tries to think more than twice, the error occurred.
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.