diff --git a/libs/core/langchain_core/v1/chat_models.py b/libs/core/langchain_core/v1/chat_models.py index 55ef5b74d37..53e130da50a 100644 --- a/libs/core/langchain_core/v1/chat_models.py +++ b/libs/core/langchain_core/v1/chat_models.py @@ -736,11 +736,7 @@ class BaseChatModel(RunnableSerializable[LanguageModelInput, AIMessageV1], ABC): ls_params["ls_stop"] = stop # model - model = ( - kwargs.get("model") - or getattr(self, "model", None) - or getattr(self, "model_name", None) - ) + model = getattr(self, "model", None) or getattr(self, "model_name", None) if isinstance(model, str): ls_params["ls_model_name"] = model