Files
langchain/libs/core/tests/unit_tests
Mason Daugherty a5a8f8db78 fix(core): add messages to bare raise ValueError calls (#38158)
Closes #35727

---

Several internal code paths raised a bare `ValueError` with no message,
so when one of these conditions tripped, users saw a traceback with no
explanation of what actually went wrong.

This adds descriptive messages to each of those `raise ValueError`
calls:

- `FewShotPromptWithTemplates._get_examples` / `_aget_examples` — when
neither `examples` nor `example_selector` is set.
- Prompt `loading` — when a referenced template file uses an unsupported
(non-`.txt`) format.
- The LangSmith document loader — when both `client` and `client_kwargs`
are supplied.
- The Anthropic file-search middleware brace expansion — for unbalanced
or empty brace patterns.

Made by [Open SWE](https://openswe.vercel.app)

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-06-22 23:02:05 -04:00
..
2026-06-18 15:23:00 -04:00
2025-10-02 18:46:26 -04:00