Repository navigation
[Automated] Draft docs (agentgateway): llm: make Bedrock Converse honor tool_choice - #1253
Merged
Merged
Conversation
…or tool_choice Signed-off-by: GitHub Action <action@github.com>
Signed-off-by: Kristin Brown <kristin.brown@solo.io>
kristin-kronstain-brown
approved these changes
Oct 9, 2026
…eway-3812 Signed-off-by: Kristin Brown <kristin.brown@solo.io>
Resolve release-notes conflicts with the v1.7 fixes section on main. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Kristin Brown <kristin.brown@solo.io>
Resolve release-notes conflicts with the v1.7 sections on main. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Kristin Brown <kristin.brown@solo.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
1 reference(s) this draft adds appear in neither the code change (agentgateway/agentgateway#3812) nor these docs. Readers run what these pages say, so check each one before merging. A host marked no has never appeared in either.
https://github.com/agentgateway/agentgateway/pull/3812agentgateway/agentgateway#3812 — llm: make Bedrock Converse honor tool_choice
Docs versions:
standalone/main,kubernetes/mainWhat changes for users: Bedrock Runtime requests now send client
tool_choicesettings as ConversetoolChoice, so forced tool choices can take effect. Some requests that Bedrock previously accepted while ignoring the field can now return Bedrock errors when the selected model rejects forced tool use.What the docs now say: The Amazon Bedrock provider pages for Kubernetes and standalone now explain Bedrock tool-choice conversion, forced tool-use errors, and extended-thinking behavior. The standalone Messages API page now says how
auto,any,tool,none, and omitted tool choices convert to Bedrock Converse.Not verified: No cluster or live Bedrock access in CI; the requests are unrun.
How
agentgateway-3812was drafted, and what was not verifiedtool_choiceinstead oftoolChoiceagentgateway#3811Plan, and what changed it
tool_choicesettings on the Bedrock provider pages.content/docs/standalone/main/documentation/llm/api-types/messages.mdowns the Messages-to-Bedrock conversion detail; this came from the candidate pages and the code diff.Why a documentation change is necessary
The pull request changes Bedrock request serialization from
tool_choicetotoolChoice, and the golden snapshots showautoserialized as{"auto": {}}. The diff also stops rewriting Messages requests with extended thinking toany; the client choice is forwarded unchanged instead. The Bedrock provider pages documented format conversion and extended thinking, but did not say that client tool-choice settings reach Bedrock or that forced tool choice can now surface a Bedrock error. The Messages API page documented Bedrock Converse conversion, but did not list howtool_choicevalues convert.No candidate page was rejected. The shared Bedrock provider page covers Kubernetes mode, the standalone Bedrock provider page covers standalone mode, and the Messages page covers the conversion-specific behavior.
The neighbor PRs in the dossier are separate Bedrock changes: #3721 covers prompt-cache preservation and #3776 covers streamed redacted reasoning. They do not carry the
toolChoicebehavior documented here.What changed on disk
assets/agw-docs/pages/agentgateway/llm/providers/bedrock.md— Added a gatedTool choicesection for Kubernetes-mode Bedrock Runtime behavior.content/docs/standalone/main/integrations/llm/providers/bedrock.md— Added the sameTool choicesection for standalone mode.content/docs/standalone/main/documentation/llm/api-types/messages.md— Added how Messagestool_choicevalues convert to Bedrock Converse.How to verify this change
Configure a Bedrock provider by following the Amazon Bedrock provider page for the mode that you want to check.
Send a chat request with a tool definition and
"tool_choice": "required"through the Bedrock route.Check the Bedrock request or provider-side trace for
toolChoice.any, or check that the response includes a tool call from a model that accepts forced tool use.Repeat with a Bedrock model that rejects forced tool use. The client receives the Bedrock error instead of a response that ignores
tool_choice.What was not verified
How the pages were chosen (triage report)
Feature clusters
Worked in another repository as well. This does not hold the cluster: a different repository documents itself in a different product's tree, on a schedule this run does not control. Listed so the other work is not a surprise later:
New configuration: no page mentions it yet
agentgateway/agentgateway#3812 — llm: make Bedrock Converse honor tool_choice
agentgateway/websitetool_choiceinstead oftoolChoiceagentgateway#3811tool_choicenever reached Bedrock Converse.ToolConfigurationserialized the field astool_choiceinstead oftoolChoice, andany/autowere serialized as strings instead of the objects Converse expects. Bedrock silently dropped the field, so"tool_choice": "required"or a named function had no effect on Claude models.crates/llm/src/tests/requests/completions/full.bedrock.snapcrates/llm/src/tests/requests/responses/namespace-tools.bedrock.snapcrates/llm/src/types/bedrock.rsRelease notes
This pull request also adds its release-note entries:
content/docs/kubernetes/main/release-notes/release-notes.md: llm: make Bedrock Converse honor tool_choice (fix, under LLM)content/docs/standalone/main/release-notes/release-notes.md: llm: make Bedrock Converse honor tool_choice (fix, under LLM)Draft branch:
pr-tracker-draft-agentgateway-3812