Files
langchain/libs/core/tests/unit_tests/callbacks
Mason Daugherty 7cc9d0c84d fix(core): async tracer on_chat_model_start fallback in sync context (#35233)
Fixes #30870

When an `AsyncBaseTracer` with `_schema_format="original"` (the default)
is used with sync `llm.invoke()`, the `on_chat_model_start` to
`on_llm_start` fallback doesn't fire. The async handler returns a
coroutine instead of raising `NotImplementedError` synchronously, so it
bypasses the existing fallback logic and lands in `_run_coros`, which
only logs the error generically.

This fallback already works for sync handlers in sync context and async
handlers in async context. This PR closes the gap for async handlers in
sync context.
2026-06-10 22:15:29 -04:00
..