This commit is contained in:
tseek 2026-04-24 23:25:14 +00:00 committed by GitHub
commit 1cf41ee44b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7715,13 +7715,17 @@ class AIAgent:
api_msg["reasoning_content"] = normalized_reasoning
return
deepseek_requires_reasoning = (
self.provider in {"deepseek", "custom"}
and base_url_host_matches(self.base_url, "api.deepseek.com")
)
kimi_requires_reasoning = (
self.provider in {"kimi-coding", "kimi-coding-cn"}
or base_url_host_matches(self.base_url, "api.kimi.com")
or base_url_host_matches(self.base_url, "moonshot.ai")
or base_url_host_matches(self.base_url, "moonshot.cn")
)
if kimi_requires_reasoning and source_msg.get("tool_calls"):
if (kimi_requires_reasoning or deepseek_requires_reasoning) and source_msg.get("tool_calls"):
api_msg["reasoning_content"] = ""
@staticmethod