langchain-ai
langchain
BlogDocsChangelog

fix(core): Pydantic nested model field descriptions in tool schema generation (#31808)

#31826
Comparing
VedankPurohit:fix/core-pydantic-tool-description-31808
(
4ea61a5
) with
master
(
557eddf
)
CodSpeed Performance Gauge
+11%
Improvements
1
Untouched
12
Skipped
21

Benchmarks

Skipped (21)

Improved

test_import_time[InMemoryVectorStore]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
+11%
682.8 ms612.8 ms

Passed

test_import_time[RunnableLambda]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
+10%
553.8 ms504.7 ms
test_import_time[LangChainTracer]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
+7%
490.3 ms456.5 ms
test_import_time[Runnable]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
+7%
542.3 ms505.3 ms
test_async_callbacks_in_sync
libs/core/tests/benchmarks/test_async_callbacks.py
CodSpeed Performance Gauge
+7%
25.1 ms23.4 ms
test_import_time[Document]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
+7%
201.7 ms188.5 ms
test_import_time[CallbackManager]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
+7%
503.4 ms471.8 ms
test_import_time[HumanMessage]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
+7%
281.3 ms264 ms
test_import_time[tool]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
+6%
560.9 ms529.4 ms
test_import_time[PydanticOutputParser]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
+5%
579 ms549.3 ms
test_import_time[BaseChatModel]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
+5%
577.8 ms550 ms
test_import_time[ChatPromptTemplate]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
+5%
679.5 ms647 ms
test_import_time[InMemoryRateLimiter]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
+4%
181.7 ms174.2 ms

Commits

Click on a commit to change the comparison range
Base
master
557eddf
-3.4%
fix(core): add is_basemodel_subclass check for Pydantic v2 nested models
4c25638
1 day ago
by Tanmay-24
+3.2%
fix(core): preserve schema attributes when propagating nested model descriptions Only update the description field of nested model properties instead of replacing the entire property schema. This preserves important attributes like $ref, type, and required status. Also adds is_basemodel_subclass check for Pydantic v1 to match v2 behavior.
e5f7e84
1 day ago
by VedankPurohit
+11.63%
Merge branch 'master' into fix/core-pydantic-tool-description-31808
4ea61a5
10 hours ago
by VedankPurohit
© 2026 CodSpeed Technology
Home Terms Privacy Docs