Skip to content

Conversation

JackYPCOnline
Copy link
Contributor

@JackYPCOnline JackYPCOnline commented Aug 28, 2025

fix stop reason in bedrock model.

This issue is raised from side team, Bedrock returns stop_reason : "end_turn" in some tool use cases, which caused Strands SDK can't execute tool call in event loop. So we special case this for now, waiting for bedrock team fixing the issue.

Test with code in this link: #644

Description

Related Issues

Documentation PR

Type of Change

Bug fix
New feature
Breaking change
Documentation update
Other (please describe):

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

  • [x ] I ran hatch run prepare

Checklist

  • [ x] I have read the CONTRIBUTING document
  • [x ] I have added any necessary tests that prove my fix is effective or my feature works
  • [x ] I have updated the documentation accordingly
  • [x ] I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • [ x] My changes generate no new warnings
  • [ x] Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@JackYPCOnline JackYPCOnline merged commit 7a5caad into strands-agents:main Aug 29, 2025
11 of 12 checks passed
Ratish1 pushed a commit to Ratish1/sdk-python that referenced this pull request Aug 30, 2025
…ts#767)

* fix: fix stop reason for bedrock model when stop_reason is end_turn in tool use response.

* change logger info to warning, optimize if condition

* fix: add unit tests

---------

Co-authored-by: Jack Yuan <[email protected]>
@JackYPCOnline JackYPCOnline deleted the stop branch August 31, 2025 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants