You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BedrockChatClient._prepare_options takes **kwargs but never uses them, so per-call client kwargs are silently dropped from the Converse request. Anything passed through get_response(..., client_kwargs={...}), like guardrailConfig or requestMetadata, just vanishes with no error.
Every sibling client forwards them, for example mistral ends _prepare_options with request.update(kwargs).
Expected Behavior
Per-call client kwargs should land in the request that goes to Bedrock.
Steps to Reproduce
Create a BedrockChatClient.
Call _prepare_options with a couple of Bedrock-native kwargs.
The returned request dict does not contain them.
Minimal Reproduction
fromagent_frameworkimportMessagefromagent_framework_bedrock._chat_clientimportBedrockChatClientclient=BedrockChatClient(model="anthropic.claude-3-haiku-20240307-v1:0", region="us-east-1",
access_key="t", secret_key="t")
msg=Message("user", ["hello"])
request=client._prepare_options(msg_list, {}, additionalModelResponseFieldPaths=["x"])
# "additionalModelResponseFieldPaths" is nowhere in request
_inner_get_response forwards the same kwargs it received from core into _prepare_options, so the plumbing is all there, only the final merge is missing. Happy to send a PR that merges kwargs like mistral does.
Acknowledgements
I searched existing issues and did not find a duplicate.
Activity
Python: fix(bedrock): merge per-call client kwargs into the Converse …