demoteSystemMessages rewrites every system-role message in the packed history to a user message. buildMessages always prepends the embedded system prompt as wire element 0, so any system message Pack returns is a SECOND, non-leading system message, which strict OpenAI-compat backends reject outright
(kept []Message)
source not stored for this graph (policy: none)