Skip to content

Conversation

@michaelnchin
Copy link
Collaborator

Fixes: #713

Updated the build_extra model args validator in ChatBedrockConverse to correctly handle direct model_kwargs user input. Previously, this would interfere with the call to langchain-core's _build_model_kwargs, which would throw a Circular reference detected error during JSON serialization.

Also added a user warning to switch to the correct additional_model_request_fields accepted by both ChatBedrockConverse, per the underlying API.

Copy link
Collaborator

@3coins 3coins left a comment

Choose a reason for hiding this comment

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

Left a minor comment about the log messages, looks good otherwise.

@michaelnchin michaelnchin requested a review from 3coins October 21, 2025 20:20
Copy link
Collaborator

@3coins 3coins left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks.

@michaelnchin michaelnchin merged commit 177d030 into langchain-ai:main Oct 22, 2025
12 checks passed
@michaelnchin michaelnchin deleted the fix/converse-model-kwargs branch October 22, 2025 03:58
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.

Passing any value for model_kwargs in ChatBedrockConverse results in Circular reference error

2 participants