LLMProxy.Providers.Routing.Sample (llm_proxy v0.2.0)

Copy Markdown View Source

One deployment-attempt performance observation used by adaptive routing.

Summary

Types

outcome()

@type outcome() :: :success | :error

t()

@type t() :: %LLMProxy.Providers.Routing.Sample{
  duration_ms: non_neg_integer(),
  observed_at: integer(),
  operation: :openai_chat | :openai_responses | :anthropic_messages,
  outcome: outcome(),
  output_tokens: non_neg_integer() | nil,
  stream: boolean(),
  ttft_ms: non_neg_integer() | nil
}

Functions

validate!(sample)

@spec validate!(t()) :: t()