Skip to content

[Bug]: Structured output tool not found on bedrock #2243

@KojoOwusu

Description

@KojoOwusu

Describe the bug

So this is related to the enhancement to enable structured outputs in bedrock. This issue was closed by this PR but It seems it has not been resolved and now when the agent tries to call the __structued_output tool, an error is thrown saying tool not found.

The approach in the PR seemed to enforce the __structured_output tool in tool_choice which i think has some negative side effects as now the model tries to respond in structured format all the time rather than just at the end.

Steps to reproduce the behavior:

Create ConversableAgent with config params api_type=bedrock and response_format=<BaseModel>
model used is: anthropic.claude-3-7-sonnet-20250219-v1:0

See error:

Input arguments: {}
Output:
Error: Function __structured_output not found.

Metadata

Metadata

Assignees

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