diff --git a/libs/community/langchain_community/chat_models/moonshot.py b/libs/community/langchain_community/chat_models/moonshot.py index 202a62d8ea1..f16f8ab6d29 100644 --- a/libs/community/langchain_community/chat_models/moonshot.py +++ b/libs/community/langchain_community/chat_models/moonshot.py @@ -42,7 +42,7 @@ class MoonshotChat(MoonshotCommon, ChatOpenAI): # type: ignore[misc] ) client_params = { - "api_key": values["moonshot_api_key"], + "api_key": values["moonshot_api_key"].get_secret_value(), "base_url": values["base_url"] if "base_url" in values else MOONSHOT_SERVICE_URL_BASE,