Wraps a non-streaming async provider call with request-scoped context metadata.
Intended for provider implementations to ensure consistent tracing and observability.
The input payload type sent to the provider
The output payload type returned by the provider
Unified AI request containing input, options, and optional context
Provider execution function to wrap
A promise resolving to a unified AIResponse with metadata attached
Wraps a non-streaming async provider call with request-scoped context metadata.
Intended for provider implementations to ensure consistent tracing and observability.