feature/llamacpp-backend #101

Merged
cameron merged 11 commits from feature/llamacpp-backend into master 2026-05-26 18:58:48 +00:00
Showing only changes of commit 208344ad98 - Show all commits

View File

@@ -3635,8 +3635,16 @@ Return ONLY the summary, nothing else."#,
}; };
// ── local client (utility calls: rerank, describe_image, etc.) ─ // ── local client (utility calls: rerank, describe_image, etc.) ─
// For llamacpp: mirror the chat model selection so rerank /
// describe_image hit the same model that's already loaded —
// avoids a mid-turn model swap in llama-swap exclusive mode.
let local: Box<dyn LlmClient> = if local_via_llamacpp { let local: Box<dyn LlmClient> = if local_via_llamacpp {
Box::new(self.llamacpp.as_ref().unwrap().as_ref().clone()) let mut lc = self.llamacpp.as_ref().unwrap().as_ref().clone();
if let Some(ref m) = overrides.model {
lc.primary_model = m.clone();
lc.set_vision_model(m.clone());
}
Box::new(lc)
} else { } else {
Box::new(self.ollama.clone()) Box::new(self.ollama.clone())
}; };