The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: Fix missing protected_namespaces (#27076)
Tibor Reiss47a9199fa6ed
diff --git a/libs/community/langchain_community/llms/azureml_endpoint.py b/libs/community/langchain_community/llms/azureml_endpoint.pyindex f2b5eed2e1..5c34ca1547 100644--- a/libs/community/langchain_community/llms/azureml_endpoint.py+++ b/libs/community/langchain_community/llms/azureml_endpoint.py@@ -9,7 +9,7 @@ from langchain_core.callbacks.manager import CallbackManagerForLLMRunfrom langchain_core.language_models.llms import BaseLLMfrom langchain_core.outputs import Generation, LLMResultfrom langchain_core.utils import convert_to_secret_str, get_from_dict_or_env-from pydantic import BaseModel, SecretStr, model_validator, validator+from pydantic import BaseModel, ConfigDict, SecretStr, model_validator, validatorDEFAULT_TIMEOUT = 50@@ -382,6 +382,8 @@ class AzureMLBaseEndpoint(BaseModel):model_kwargs: Optional[dict] = None"""Keyword arguments to pass to the model."""+ model_config = ConfigDict(protected_namespaces=())+@model_validator(mode="before")@classmethoddef validate_environ(cls, values: Dict) -> Any:diff --git a/libs/community/langchain_community/llms/bedrock.py b/libs/community/langchain_community/llms/bedrock.pyindex 2436ca765b..a0de3fb81e 100644--- a/libs/community/langchain_community/llms/bedrock.py+++ b/libs/community/langchain_community/llms/bedrock.py@@ -295,6 +295,8 @@ class LLMInputOutputAdapter:class BedrockBase(BaseModel, ABC):"""Base class for Bedrock models."""+ model_config = ConfigDict(protected_namespaces=())+client: Any = Field(exclude=True) #: :meta private:region_name: Optional[str] = Nonediff --git a/libs/community/langchain_community/llms/minimax.py b/libs/community/langchain_community/llms/minimax.pyindex e508eb4f95..5a1822fffb 100644--- a/libs/community/langchain_community/llms/minimax.py+++ b/libs/community/langchain_community/llms/minimax.py@@ -16,7 +16,7 @@ from langchain_core.callbacks import ()from langchain_core.language_models.llms import LLMfrom langchain_core.utils import convert_to_secret_str, get_from_dict_or_env, pre_init-from pydantic import BaseModel, Field, SecretStr, model_validator+from pydantic import BaseModel, ConfigDict, Field, SecretStr, model_validatorfrom langchain_community.llms.utils import enforce_stop_tokens@@ -58,6 +58,8 @@ class _MinimaxEndpointClient(BaseModel):class MinimaxCommon(BaseModel):"""Common parameters for Minimax large language models."""+ model_config = ConfigDict(protected_namespaces=())+_client: _MinimaxEndpointClientmodel: str = "abab5.5-chat""""Model name to use."""diff --git a/libs/community/langchain_community/llms/vertexai.py b/libs/community/langchain_community/llms/vertexai.pyindex 35fd883fdd..0b42bd535e 100644--- a/libs/community/langchain_community/llms/vertexai.py+++ b/libs/community/langchain_community/llms/vertexai.py@@ -11,7 +11,7 @@ from langchain_core.callbacks.manager import (from langchain_core.language_models.llms import BaseLLMfrom langchain_core.outputs import Generation, GenerationChunk, LLMResultfrom langchain_core.utils import pre_init-from pydantic import BaseModel, Field+from pydantic import BaseModel, ConfigDict, Fieldfrom langchain_community.utilities.vertexai import (create_retry_decorator,@@ -100,6 +100,8 @@ async def acompletion_with_retry(class _VertexAIBase(BaseModel):+ model_config = ConfigDict(protected_namespaces=())+project: Optional[str] = None"The default GCP project to use when making Vertex API calls."location: str = "us-central1"diff --git a/libs/community/langchain_community/llms/volcengine_maas.py b/libs/community/langchain_community/llms/volcengine_maas.pyindex c62c3523bb..e737a0a556 100644--- a/libs/community/langchain_community/llms/volcengine_maas.py+++ b/libs/community/langchain_community/llms/volcengine_maas.py@@ -6,12 +6,14 @@ from langchain_core.callbacks import CallbackManagerForLLMRunfrom langchain_core.language_models.llms import LLMfrom langchain_core.outputs import GenerationChunkfrom langchain_core.utils import convert_to_secret_str, get_from_dict_or_env, pre_init-from pydantic import BaseModel, Field, SecretStr+from pydantic import BaseModel, ConfigDict, Field, SecretStrclass VolcEngineMaasBase(BaseModel):"""Base class for VolcEngineMaas models."""+ model_config = ConfigDict(protected_namespaces=())+client: Any = Nonevolc_engine_maas_ak: Optional[SecretStr] = None