fixes tool callong

This commit is contained in:
valenti
2026-10-21 10:44:49 +01:00
parent 79f927d968
commit 1cafe3dd3c
14 changed files with 2308 additions and 61 deletions
+3 -1
View File
@@ -602,7 +602,9 @@ impl TurnManager {
// is re-asked without streaming, where the server returns the call it
// dropped from the SSE path. Bounded by `LLM_TOOL_MAX_ITERATIONS`. With
// no tools configured the loop runs exactly once.
let registry = llm.tools().cloned();
// Re-read per turn: a runtime override (`POST /api/tools`) is picked up
// by the next turn without a restart.
let registry = llm.tools();
let max_rounds = self.config.llm_tool_max_iterations.max(1);
let mut spoken = String::new();
let mut round = 0usize;