Bug Fixes
- tracing: Resolves an issue where wrapping an async generator on Python 3.11 through 3.14 raises a
TypeError: object NoneType can't be used in 'await' expressionerror. This occurs when the generator body awaits a coroutine that suspends to the event loop before its firstyield. Python 3.9 and 3.10 are not affected.
- LLM Observability: Resolves an issue in the
openaiintegration where streamed chat completion spans under-reportedoutput_tokensandtotal_tokensfor OpenAI-compatible providers that emit a cumulativeusageobject on every streamed chunk.
- tracing: Applying
@tracer.wrap()to an async generator now forwards sent values, thrown exceptions, and close requests to the underlying generator, so it behaves like the unwrapped generator in all cases. Previously the wrapper only relayed values during forward iteration, so sent values were dropped andtry/finallycleanup was skipped whenever the generator was closed early or received a thrown exception.
- core: This fix prevents periodic thread restarts from blocking application code from resuming in forked children.
- tracing: A rare crash happening on versions of CPython prior to 3.12 has been fixed.