Health checks for LLM/embedding providers.
Probes a provider endpoint and returns connectivity status, latency, and model availability. Used by higher-level diagnostics tools (e.g., Botica.Doctor) to surface actionable status to the user.
Summary
Functions
Runs a quick SELECT-1 equivalent for LLM providers: sends a minimal embedding request to verify the model is actually loaded and responding.
Probes a provider endpoint and returns its health status.
Types
@type t() :: %Candil.Health{ error: String.t() | nil, latency_ms: non_neg_integer() | nil, models_available: non_neg_integer() | nil, provider: String.t(), reachable: boolean() }
Health status for a single provider
Functions
Runs a quick SELECT-1 equivalent for LLM providers: sends a minimal embedding request to verify the model is actually loaded and responding.
Probes a provider endpoint and returns its health status.
Options
:timeout— request timeout in ms (default: 5_000):api_key— optional API key for authenticated providers