langchain-ai
langchain
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
update deprecated version
cbornet:typing-dict
23 minutes ago
core: deprecate problematic dict() method
cbornet:typing-dict
28 minutes ago
test(openai): add missing assertions in test_convert_delta_to_message_chunk_with_none_function
LAMZANJYU:fix/handle-missing-function-in-tool-calls
4 hours ago
fix(core): `RunnablePick` method return types (#34208) Following https://github.com/langchain-ai/langchain/pull/31321, the `Output` type of `RunnablePick` is `Any`.
master
8 hours ago
Merge branch 'master' into fix-anthropic-empty-aimessage-streaming
majiayu000:fix-anthropic-empty-aimessage-streaming
8 hours ago
fix(core): preserve `Field(description=...)` in `@tool` decorator (#34354) ## Summary Fixes #34247 When using `Annotated[type, Field(description="...")]` syntax with the `@tool` decorator, field descriptions were being lost during schema generation. The `_get_annotation_description()` function only checked for string annotations but not for Pydantic `FieldInfo` objects. ## Changes - Extended `_get_annotation_description()` to also extract descriptions from `FieldInfo` objects within `Annotated` types - Added import for `pydantic.fields.FieldInfo` - Added unit test to verify `Field(description=...)` is preserved ## Why this approach The fix is minimal and targeted - it extends the existing description extraction logic rather than restructuring the schema generation. This maintains backward compatibility while supporting both annotation styles: ```python # Both now work correctly: topic: Annotated[str, "The research topic"] # existing topic: Annotated[str, Field(description="...")] # now fixed ``` ## Known limitation This fix only handles `pydantic.fields.FieldInfo` (Pydantic v2). The v1 compatibility layer (`pydantic.v1.fields.FieldInfo`) is a different class and will not have descriptions extracted. This is intentional: - Pydantic v1 is deprecated; users should migrate to v2 - The v1 compat layer exists for legacy model migration, not new tool definitions - Duck-typing on `description` attribute could match unintended objects If v1 `Field` support is needed, it can be addressed in a follow-up PR with explicit handling. ## Testing - Added `test_tool_field_description_preserved()` covering required and optional params - Verified existing `test_tool_annotated_descriptions` still passes - Lint and type checks pass --- > [!NOTE] > This PR was developed with AI agent assistance (Factory/Droid). --------- Co-authored-by: Mason Daugherty <github@mdrxy.com>
master
9 hours ago
cr
edlsh:fix/tool-field-description-34247
9 hours ago
cr
nathannewyen:fix/34384-tool-default-args
9 hours ago
Active Branches
feat(core): deprecate problematic `dict()` method
last run
23 minutes ago
#31685
CodSpeed Performance Gauge
-2%
fix(openai): handle missing function field in streaming tool_calls
last run
4 hours ago
#34432
CodSpeed Performance Gauge
0%
fix(anthropic): handle pre-completed content in message_start events
last run
8 hours ago
#34408
CodSpeed Performance Gauge
0%
© 2025 CodSpeed Technology
Home
Terms
Privacy
Docs