ReqLLM.Telemetry.RequestOptions (ReqLLM v1.14.0)

View Source

Normalizes caller-facing inference options into the compact request_options map exposed on [:req_llm, :request, *] telemetry metadata.

The shape is OTel-attribute-friendly — keys map 1:1 to gen_ai.request.* attributes in ReqLLM.OpenTelemetry.Attributes — but the data lives in the telemetry context and is available to any consumer of the lifecycle events.

Keys whose value is nil are dropped so consumers never see blank-but-present fields.

Summary

Functions

Builds the compact request_options map from caller opts.

Functions

extract(mode, opts)

@spec extract(
  :sync | :stream,
  keyword()
) :: map()

Builds the compact request_options map from caller opts.