feat: tools bei Modellen ohne Werkzeug-Vorlage klar ablehnen, nicht bestandenen Werkzeug-Test anzeigen (#1268)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 12:28:21 +01:00
parent 21d419aab1
commit 2ad3121c7c
9 changed files with 168 additions and 3 deletions

View File

@ -111,6 +111,27 @@ async fn start_bereit_log_und_stopp() {
engine.stop(&inst, Duration::from_secs(1)).await.unwrap();
}
#[tokio::test]
async fn auskunft_der_chat_vorlage_zu_werkzeugen() {
for (wert, erwartet) in [
(Some("0"), Some(false)),
(Some("1"), Some(true)),
(None, None),
] {
let mut f = fixture("ok", 20);
if let Some(wert) = wert {
f.config
.env
.insert("FAKE_LLAMA_TOOLS".to_string(), wert.to_string());
}
let engine = LlamaCppEngine::new(f.config.clone());
let inst = engine.start(&profile(&f)).await.expect("Start");
assert_eq!(engine.tool_support(&inst).await, erwartet, "{wert:?}");
engine.stop(&inst, Duration::from_secs(5)).await.unwrap();
assert_eq!(engine.tool_support(&inst).await, None);
}
}
#[tokio::test]
async fn von_aussen_beendeter_prozess_wird_als_gone_erkannt() {
let f = fixture("ok", 20);