Skip to content

bedrock tool use with structured output#120

Merged
JV-DM merged 4 commits into
masterfrom
jvdm/bedrock-tool-use-structured-output
Jul 8, 2026
Merged

bedrock tool use with structured output#120
JV-DM merged 4 commits into
masterfrom
jvdm/bedrock-tool-use-structured-output

Conversation

@JV-DM

@JV-DM JV-DM commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
  • Adds a :structured_output_strategy option to LlmComposer.Providers.Bedrock (:native default, :tool_use opt-in) that forces the model to call a synthesized structured_response tool built from :response_schema, so response_schema can work on models without native structured-output support.
  • Parser unwraps the structured_response tool call's arguments into main_response.content and strips it from function_calls, preserving any other genuine tool calls made in the same turn.

Need this to run the email summary llm - this will allow bedrock models to work with tools and strucutred outputs

PD: I am not sure if this is the best approach, im open to suggestions

@JV-DM
JV-DM requested review from nvelasco and sonic182 July 8, 2026 09:15
@JV-DM JV-DM self-assigned this Jul 8, 2026

@sonic182 sonic182 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

document the new option to use one way or another way of tools definition pls, in Bedrock module maybe?

@JV-DM

JV-DM commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

document the new option to use one way or another way of tools definition pls, in Bedrock module maybe?

I added some documentation regarding this

@JV-DM
JV-DM requested a review from sonic182 July 8, 2026 09:37

@sonic182 sonic182 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update CHANGELOG.md

@JV-DM
JV-DM merged commit edf5727 into master Jul 8, 2026
2 checks passed
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.

3 participants