mirror of
https://github.com/hwchase17/langchain.git
synced 2026-07-01 14:47:02 +00:00
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.