diff --git a/libs/aws/langchain_aws/chat_models/bedrock_converse.py b/libs/aws/langchain_aws/chat_models/bedrock_converse.py index 4748d8b6..90d0ed52 100644 --- a/libs/aws/langchain_aws/chat_models/bedrock_converse.py +++ b/libs/aws/langchain_aws/chat_models/bedrock_converse.py @@ -393,6 +393,9 @@ class Joke(BaseModel): ('auto') if a 'nova' model is used, empty otherwise. """ + request_metadata: Optional[Dict[str, str]] = None + """Key-Value pairs that you can use to filter invocation logs.""" + model_config = ConfigDict( extra="forbid", populate_by_name=True, @@ -623,6 +626,7 @@ def _converse_params( additionalModelRequestFields: Optional[dict] = None, additionalModelResponseFieldPaths: Optional[List[str]] = None, guardrailConfig: Optional[dict] = None, + requestMetadata: Optional[dict] = None, ) -> Dict[str, Any]: if not inferenceConfig: inferenceConfig = { @@ -645,6 +649,7 @@ def _converse_params( "additionalModelResponseFieldPaths": additionalModelResponseFieldPaths or self.additional_model_response_field_paths, "guardrailConfig": guardrailConfig or self.guardrail_config, + "requestMetadata": requestMetadata or self.request_metadata, } )