diff --git a/nanobot/agent/context.py b/nanobot/agent/context.py index 608c11af4..cd4a7e621 100644 --- a/nanobot/agent/context.py +++ b/nanobot/agent/context.py @@ -127,6 +127,7 @@ Reply directly with text for conversations. Only use the 'message' tool to send media: list[str] | None = None, channel: str | None = None, chat_id: str | None = None, + current_role: str = "user", ) -> list[dict[str, Any]]: """Build the complete message list for an LLM call.""" runtime_ctx = self._build_runtime_context(channel, chat_id) @@ -142,7 +143,7 @@ Reply directly with text for conversations. Only use the 'message' tool to send return [ {"role": "system", "content": self.build_system_prompt(skill_names)}, *history, - {"role": "user", "content": merged}, + {"role": current_role, "content": merged}, ] def _build_user_content(self, text: str, media: list[str] | None) -> str | list[dict[str, Any]]: