feat(ui): Reiter Engines und überarbeitete Modelle-Seite mit Dialog je Modell (#1068)

Engine::start_info meldet das Startkommando mit Platzhaltern. Die Karten
"Planung ändern" weichen einem Dialog je Modell. Lokal mit Attrappen im
Browser gesehen, auf srv04 nicht geprüft.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GmHhg3osejhFSpUz472iQ1
This commit is contained in:
2026-11-16 12:54:29 +01:00
parent a4e791b571
commit cb685b0659
15 changed files with 532 additions and 61 deletions

View File

@ -19,7 +19,7 @@ use crate::engine::Engine;
use crate::process::{PortPool, http_status, log_tail, rotate_log, sigterm};
use crate::types::{
AdapterError, Capabilities, DiscoveredArtifact, Endpoint, EngineInfo, Health, InstanceHandle,
Mode, ProfileSpec, Protocol, Result, Usage,
Mode, ProfileSpec, Protocol, Result, StartInfo, Usage,
};
/// Konfiguration des llama.cpp-Adapters. Enthält keine Geheimnisse.
@ -251,6 +251,47 @@ impl LlamaCppEngine {
#[async_trait]
impl Engine for LlamaCppEngine {
fn start_info(&self) -> StartInfo {
let c = &self.config;
let mut command = format!(
"{} -m <Modelldatei> --host 127.0.0.1 --port <Port> -ngl {} --alias <Modellname> [-c <Kontext>]",
c.binary.display(),
c.gpu_layers
);
for a in &c.extra_args {
command.push(' ');
command.push_str(a);
}
let mut env = vec![(
"CUDA_VISIBLE_DEVICES".to_string(),
"<GPUs des Modells>".to_string(),
)];
env.extend(c.env.iter().map(|(k, v)| (k.clone(), v.clone())));
StartInfo {
executable: Some(c.binary.clone()),
command,
env,
details: vec![
(
"Modellordner".to_string(),
c.model_roots
.iter()
.map(|p| p.display().to_string())
.collect::<Vec<_>>()
.join(", "),
),
(
"Ports".to_string(),
format!("{} bis {}", c.port_from, c.port_to),
),
(
"Zeitlimit Start".to_string(),
format!("{} s", c.ready_timeout_secs),
),
],
}
}
fn describe(&self) -> EngineInfo {
EngineInfo {
name: "llama.cpp".to_string(),