mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-06-13 22:34:06 +00:00
Custom providers (e.g. DeepSeek) may return reasoning_content as an empty string "" to explicitly indicate no reasoning occurred. The previous truthiness checks (, ) treated "" as falsy and converted it to None, which caused the field to be dropped from the message history entirely. Providers that require reasoning_content on all assistant messages then rejected subsequent requests. Replace truthiness checks with identity checks () so that empty-string reasoning_content is preserved as-is. The streaming path is unchanged since an empty join genuinely means no chunks received. Fixes #4105