diff --git a/libs/core/langchain_core/tools/base.py b/libs/core/langchain_core/tools/base.py index 1b1ca28ee91..4a9816b8e3a 100644 --- a/libs/core/langchain_core/tools/base.py +++ b/libs/core/langchain_core/tools/base.py @@ -318,7 +318,7 @@ def create_schema_from_function( **field_definitions, ) model.__doc__ = textwrap.dedent(description or func.__doc__ or "") - return cast(type[BaseModel], model) + return cast("type[BaseModel]", model) class ToolException(Exception): # noqa: N818