providerplaneai
    Preparing search index...
    • Wraps a non-streaming async provider call with request-scoped context metadata.

      • Generates a unique requestId and start time
      • Injects request context into the AIRequest
      • Attaches timing and request metadata to the AIResponse

      Intended for provider implementations to ensure consistent tracing and observability.

      Type Parameters

      • TInput

        The input payload type sent to the provider

      • TOutput

        The output payload type returned by the provider

      Parameters

      Returns Promise<AIResponse<TOutput>>

      A promise resolving to a unified AIResponse with metadata attached