Wraps a streaming provider call with request-scoped tracing metadata.
This helper:
Designed for streaming chat, image generation, or any provider API that emits incremental results.
The input payload type sent to the provider.
The output payload type for each streamed chunk.
Unified AI request containing input, options, and optional context.
Provider streaming execution function to wrap.
An async generator emitting response chunks with metadata attached.
Wraps a streaming provider call with request-scoped tracing metadata.
This helper:
Designed for streaming chat, image generation, or any provider API that emits incremental results.