Stabilize live chat tool loop

This commit is contained in:
2026-05-22 21:13:58 +08:00
parent eef010f227
commit 1291281d7e
9 changed files with 182 additions and 20 deletions
+4
View File
@@ -16,6 +16,10 @@ cp .env.example .env
The default `DUCK_MAIN_MODEL_PATH` points to `./models/Qwen3.6/nonMTP/Qwen3.6-35B-A3B-UD-Q4_K_M.gguf`.
`DUCK_ENABLE_REFLECTION=0` is the recommended default for the local single-slot
stack. Set it to `1` only when you explicitly want critic reflection after each
chat and accept that it can slow down the next request.
3. Start DuckLM:
```bash
+3
View File
@@ -51,6 +51,9 @@ Structured utility roles are validated locally before side effects:
- `action` output must match `duck_core/schemas/action_directive.schema.json`; invalid directives are logged as `action_directive_failed` and no tool runs.
- `memory_policy` output must match its JSON schema; invalid decisions fall back to `should_store=false`.
- Large tool outputs are compacted before being sent back to the model; full outputs remain in task events and command audit.
- Duplicate identical tool actions in one task are skipped and logged as `tool_call_skipped`.
- Critic reflection is controlled by `DUCK_ENABLE_REFLECTION`; the default is off for responsive single-slot local chat.
Chat requests accept optional `reasoning`: