Keeps bounded, per-deployment performance observations for latency-aware routing.
State is intentionally node-local and ephemeral. Durable request accounting remains in storage, while this process only serves the routing hot path.
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type stats() :: %{ success_count: non_neg_integer(), ttft_count: non_neg_integer(), error_count: non_neg_integer(), median_duration_ms: number() | nil, median_ttft_ms: number() | nil, updated_at: integer() | nil }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec observe( LLMProxy.Providers.Attempt.t(), LLMProxy.Providers.Routing.Sample.t(), atom() | nil ) :: :ok
@spec order( String.t(), [LLMProxy.Catalog.Deployment.t()], LLMProxy.Protocol.Request.t() ) :: [ LLMProxy.Catalog.Deployment.t() ]
@spec reset() :: :ok
@spec start_link(keyword()) :: GenServer.on_start()
@spec stats(LLMProxy.Providers.Attempt.t(), LLMProxy.Protocol.Request.t()) :: stats()