diff --git a/libs/standard-tests/langchain_standard_tests/integration_tests/chat_models.py b/libs/standard-tests/langchain_standard_tests/integration_tests/chat_models.py index 32d922a3e4a36..ec7e81af1ed03 100644 --- a/libs/standard-tests/langchain_standard_tests/integration_tests/chat_models.py +++ b/libs/standard-tests/langchain_standard_tests/integration_tests/chat_models.py @@ -523,3 +523,10 @@ def test_tool_message_error_status(self, model: BaseChatModel) -> None: ] result = model_with_tools.invoke(messages) assert isinstance(result, AIMessage) + + def test_message_with_name(self, model: BaseChatModel) -> None: + result = model.invoke([HumanMessage("hello", name="example_user")]) + assert result is not None + assert isinstance(result, AIMessage) + assert isinstance(result.content, str) + assert len(result.content) > 0