Watch
0
0
Fork
You've already forked hyperhive
0

swarm-controller: GET /api/models lists the model names the swarm already knows

This commit is contained in:
iris 2026-11-22 13:40:34 +01:00
commit ef817ed5a0

View file

@ -51,6 +51,17 @@ pub struct InferenceSettings {
pub fresh_session_percent: Option<u8>,
}
/// What `GET /api/models` answers: the model names the swarm already knows,
/// for a form to offer.
#[derive(Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]
pub struct KnownModels {
/// Every distinct model in any agent's stored inference settings (its model
/// and its subagent models) or reported running, sorted. Empty on a swarm
/// where no agent has either.
pub models: Vec<String>,
}
/// What `GET` answers for one agent.
#[derive(Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]