Files
langchain/libs/langchain_v1/tests/unit_tests/agents/middleware
Blut-agent d328d84b78 fix(langchain): sort glob_search results by mtime (newest first) (#37462)
Closes #37369

---

The `glob_search` tool in `FilesystemFileSearchMiddleware` documents
that
results are "sorted by modification time (most recently modified
first)",
but the implementation was returning files in the arbitrary order
provided
by `Path.glob()`.

This change adds a sort by modification timestamp (`modified_at`), in
descending order, immediately before extracting the file paths for the
return value. No public API changes.

---------

Co-authored-by: Mason Daugherty <github@mdrxy.com>
2026-05-16 18:09:53 -07:00
..