mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-04-10 05:03:41 +00:00
_sanitize_messages strips all non-standard keys from messages, including reasoning_content. Thinking-enabled models like Moonshot Kimi k2.5 require reasoning_content to be present in assistant tool call messages when thinking mode is on, causing a BadRequestError (#1014). Add reasoning_content to _ALLOWED_MSG_KEYS so it passes through sanitization when present. Fixes #1014