Files
langchain/libs/core/langchain_core/utils
Rudra Tiwari 75e237643a perf(core): move origin type map to module level in function_calling.py (#34481)
Moves `_ORIGIN_MAP` dict from inside `_py_38_safe_origin()` to module
level constant. This avoids dict allocation on every function call,
reducing garbage collection pressure during frequent tool conversions.

The function is called during typed dict to pydantic model conversion
which happens during tool binding and invocation - a hot path in
LangChain.

**Testing:** `make lint` passes

---------

Co-authored-by: Mason Daugherty <mason@langchain.dev>
Co-authored-by: Mason Daugherty <github@mdrxy.com>
2025-12-25 21:29:31 -06:00
..
2025-10-15 18:46:55 -04:00
2025-07-07 13:02:40 -04:00
2025-10-15 18:46:55 -04:00
2025-12-12 10:33:14 -05:00
2025-10-27 19:04:29 -04:00