fix(providers): allow reasoning_content in message history for thinking models

This commit is contained in:
fengxiaohu
2026-02-28 18:46:15 +08:00
parent f223a4c5a3
commit 52222a9f84

View File

@@ -13,7 +13,7 @@ from nanobot.providers.registry import find_by_model, find_gateway
# Standard OpenAI chat-completion message keys; extras (e.g. reasoning_content) are stripped for strict providers.
_ALLOWED_MSG_KEYS = frozenset({"role", "content", "tool_calls", "tool_call_id", "name"})
_ALLOWED_MSG_KEYS = frozenset({"role", "content", "tool_calls", "tool_call_id", "name", "reasoning_content"})
class LiteLLMProvider(LLMProvider):