diff --git a/libs/partners/xai/langchain_xai/chat_models.py b/libs/partners/xai/langchain_xai/chat_models.py index f4fb5904a9c15..255b3637e9dd5 100644 --- a/libs/partners/xai/langchain_xai/chat_models.py +++ b/libs/partners/xai/langchain_xai/chat_models.py @@ -267,7 +267,8 @@ class Joke(BaseModel): model_config = ConfigDict( populate_by_name=True, - extra="forbid" + extra="forbid", + json_excludes={"openai_api_key"} ) @property