• Runs fn with a marker that fills in if an llm_request span is created inside it. onRecorded runs at that moment: what the node knew before the request (its configured model and provider) is recorded before a fallback can overwrite the provider with the instance that actually served, and never afterwards.

    Type Parameters

    • T

    Parameters

    • fn: ((marker) => T)
    • options: {
          onRecorded?: (() => void);
      } = {}
      • Optional onRecorded?: (() => void)
          • (): void
          • Returns void

    Returns T