feature/llamacpp-backend #101
@@ -3635,8 +3635,16 @@ Return ONLY the summary, nothing else."#,
|
||||
};
|
||||
|
||||
// ── 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 {
|
||||
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 {
|
||||
Box::new(self.ollama.clone())
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user