Skip to main content

cure

Function cure 

Source
pub fn cure() -> Result<CureSource, CureError>
Expand description

Run the model discovery pipeline and persist results to ~/.gate4agent/models.json.

The pipeline tries each source in order; the first successful source wins. Failures from individual sources are treated as non-fatal (the function falls through to the next source). Only the final write_cache error propagates as Err.

Returns [Ok(CureSource)] indicating which source was used.

Safe to call from any synchronous context. For async callers with the cure-network feature enabled, prefer [cure_async()] to avoid blocking.