Skip to content

[BUG] Using structured_output inside of a Tool responds with: No valid tool use or tool use input was found in the Bedrock response #309

Open
@braddengross

Description

@braddengross

Checks

  • I have updated to the lastest minor and patch version of Strands
  • I have checked the documentation and this is not expected behavior
  • I have searched ./issues and there are no duplicates of my issue

Strands Version

0.1.9

Python Version

3.11.11

Operating System

macOS 15.3.2

Installation Method

pip

Steps to Reproduce

  1. Create an Tool with an agent that uses a structured_response of a Pydantic model.
  2. Create another agent with access to that tool.
  3. The second tool will to use the structured_response tool, but respond with the error: "No valid tool use or tool use input was found in the Bedrock response."

Expected Behavior

The tool should return its normal, expected response. In this case, I took the structured_response and converted into to JSON and returned a normal status/content response.

Actual Behavior

Structured response agent inside of Tool responds with No valid tool use or tool use input was found in the Bedrock response.

Additional Context

This only happens when calling this as a Tool. If I call the @tool decorated directly, it responds correctly.

Possible Solution

It may be that the structured response needs to combine some information from the context that this is a tool invocation.

Related Issues

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions