pub fn discover(
list: &EndpointList,
model: Option<&str>,
timeout: Duration,
) -> DiscoveryResultExpand description
Probe every OpenAI-compatible endpoint in list for its served models and
fold the results into a DiscoveryResult. model is the configured model
id and is always unioned in, because it is dialable whether or not any
endpoint answered the probe. Every failure mode is silent: a probe that 404s,
cannot connect, or returns non-JSON contributes no models and leaves
discovery false. It is never fatal and never counts as a failover-class
error, so a probe must not be able to trip an endpoint’s circuit breaker.
Must not be called on the hot path or at startup — only when the served
agentd://intelligence or live agentd://capabilities surface is actually
read. It probes every endpoint on every call, so the caller must cache the
result rather than re-running it per read.