microsoft/autogen · error · ValueError

bedrock_info is required for AnthropicBedrockChatCompletionC

Error message

bedrock_info is required for AnthropicBedrockChatCompletionClient

What it means

Error "bedrock_info is required for AnthropicBedrockChatCompletionClient" thrown in microsoft/autogen.

Source

Thrown at python/packages/autogen-ext/src/autogen_ext/models/anthropic/_anthropic_client.py:1360

    def __init__(self, **kwargs: Unpack[AnthropicBedrockClientConfiguration]):
        if "model" not in kwargs:
            raise ValueError("model is required for  AnthropicBedrockChatCompletionClient")

        self._raw_config: Dict[str, Any] = dict(kwargs).copy()
        copied_args = dict(kwargs).copy()

        model_info: Optional[ModelInfo] = None
        if "model_info" in kwargs:
            model_info = kwargs["model_info"]
            del copied_args["model_info"]

        bedrock_info: Optional[BedrockInfo] = None
        if "bedrock_info" in kwargs:
            bedrock_info = kwargs["bedrock_info"]

        if bedrock_info is None:
            raise ValueError("bedrock_info is required for AnthropicBedrockChatCompletionClient")

        # Handle bedrock_info
        aws_region = bedrock_info["aws_region"]
        aws_access_key: Optional[str] = None
        aws_secret_key: Optional[str] = None
        aws_session_token: Optional[str] = None
        if all(key in bedrock_info for key in ("aws_access_key", "aws_secret_key", "aws_session_token")):
            aws_access_key = bedrock_info["aws_access_key"]
            aws_secret_key = bedrock_info["aws_secret_key"]
            aws_session_token = bedrock_info["aws_session_token"]

        client = AsyncAnthropicBedrock(
            aws_access_key=aws_access_key,
            aws_secret_key=aws_secret_key,
            aws_session_token=aws_session_token,
            aws_region=aws_region,
        )
        create_args = _create_args_from_config(copied_args)

View on GitHub (pinned to 027ecf0a37)

Solutions

  1. Provide BedrockInfo with region/credentials

Example fix

Pass bedrock_info=BedrockInfo(...) to the client

When it happens

Trigger: Thrown at python/packages/autogen-ext/src/autogen_ext/models/anthropic/_anthropic_client.py:1360 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of microsoft/autogen@027ecf0a37 (2026-08-15). Data as JSON: /api/errors/05ad5c44806f9bfc. Report an issue: GitHub.