Files
agent-framework/python/packages/bedrock
T
L. Elaine Dazzio b6a1315386 fix: omit toolConfig when tool_choice="none" in BedrockChatClient (#4535)
Bedrock's Converse API only accepts "auto", "any", or "tool" as valid
toolChoice keys. The previous code mapped tool_choice="none" to
{"none": {}}, which causes a botocore.exceptions.ParamValidationError.

When tool_choice="none" (set by FunctionInvocationLayer after exhausting
max iterations), the fix now omits toolConfig entirely so the model
won't attempt tool calls.

Added tests for tool_choice="none", "auto", and "required" modes.

Fixes #4529

Co-authored-by: Eduard van Valkenburg <eavanvalkenburg@users.noreply.github.com>
b6a1315386 ยท 2026-03-12 18:49:08 +00:00
History
..
2026-03-11 18:53:38 +00:00

Get Started with Microsoft Agent Framework Bedrock

Install the provider package:

pip install agent-framework-bedrock --pre

Bedrock Integration

The Bedrock integration enables Microsoft Agent Framework applications to call Amazon Bedrock models with familiar chat abstractions, including tool/function calling when you attach tools through ChatOptions.

Basic Usage Example

See the Bedrock sample for a runnable end-to-end script that:

  • Loads credentials from the BEDROCK_* environment variables
  • Instantiates BedrockChatClient
  • Sends a simple conversation turn and prints the response