langchain-ai
langchain
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(core): make abatch_iterate consistent with batch_iterate for None and zero size (#39367)
master
2 hours ago
clean up
pxmpsdev:fix/core-abatch-iterate-none
3 hours ago
fix(core): don't hand the str builtin to PlainSerializer Pydantic < 2.9 calls `inspect.signature()` on an annotated serializer to decide whether to pass an `info` argument, and that raises `ValueError: no signature found for builtin type <class 'str'>`. The failure is at class creation, so importing langchain_core.tools broke entirely on pydantic 2.7/2.8. Use a small named function instead. Verified on pydantic 2.7.4 and 2.13.4. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
emil/tool-json-serialization
4 hours ago
fix(core): attach the JSON fallbacks via Annotated, not @field_serializer A `@field_serializer` takes the field's one serializer slot, so any subclass declaring its own serializer for `func`, `coroutine` or `args_schema` would fail at class creation with `PydanticUserError: Multiple field serializer functions were defined`. Those subclasses were valid before this PR. `PlainSerializer` in the field's `Annotated` metadata leaves the decorator slot free: a subclass serializer is accepted and takes precedence. Output, dump options and CPU cost are unchanged (0.014 ms vs 0.134 ms on master for a 12-tool payload, byte-identical). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
emil/tool-json-serialization
7 hours ago
chore(langchain): update docs on error handling for json schema (#39632)
master
8 hours ago
update docstring
cc/handle_errors_docstring
8 hours ago
fix(core): attach the JSON fallbacks via Annotated, not @field_serializer A `@field_serializer` takes the field's one serializer slot, so any subclass declaring its own serializer for `func`, `coroutine` or `args_schema` would fail at class creation with `PydanticUserError: Multiple field serializer functions were defined`. Those subclasses were valid before this PR. `PlainSerializer` in the field's `Annotated` metadata leaves the decorator slot free: a subclass serializer is accepted and takes precedence. Output, dump options and CPU cost are unchanged (0.014 ms vs 0.134 ms on master for a 12-tool payload, byte-identical). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
emil/tool-json-serialization
9 hours ago
fix(core): make StructuredTool JSON-serializable `StructuredTool.model_dump(mode="json")` and `model_dump_json()` raise `PydanticSerializationError`: `args_schema` holds a Pydantic model *class* and `func`/`coroutine` hold callables, none of which have a JSON form. Add `when_used="json-unless-none"` field serializers that render those three fields as strings. Python-mode dumps are untouched and still hand out the live objects, a dict `args_schema` is passed through unchanged, and because these are field serializers rather than a model serializer, `exclude`/`include`/ `exclude_none` keep working. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
emil/tool-json-serialization
9 hours ago
Latest Branches
CodSpeed Performance Gauge
0%
fix(core): make abatch_iterate consistent with batch_iterate for None and zero size
#39367
3 hours ago
2fd8e43
pxmpsdev:fix/core-abatch-iterate-none
CodSpeed Performance Gauge
0%
fix(core): make StructuredTool JSON-serializable
#39631
4 hours ago
1d993ca
emil/tool-json-serialization
CodSpeed Performance Gauge
0%
chore(langchain): update docs on error handling for json schema
#39632
8 hours ago
ce44b81
cc/handle_errors_docstring
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs