Strict chat templates served by vLLM/SGLang (Qwen3.5/3.6, Mistral, Gemma)
reject a system message that is not first, and some APIs (DeepSeek reasoner)
reject successive user/assistant messages. LocalAgent sent the knowledge-base
context as a mid-conversation system message and the event-data message as a
second user turn, so any KB-backed run on Qwen3.5+ via vLLM/SGLang failed with
"Invalid request parameters".
- Retrieved KB context is untrusted data and now uses the user role.
- Every model call normalizes roles at the boundary: all system messages fold
into one leading system message and consecutive user (or tool-call-free
assistant) messages merge. Tool call/result turns are never merged.
- Bump LocalAgent to 0.2.11.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>