mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-29 06:31:32 +00:00
fix(run_agent): scope kimi tool-reasoning trigger to host, not model name substring
This commit is contained in:
parent
af7b38d78e
commit
532b209f01
1 changed files with 5 additions and 3 deletions
|
|
@ -3601,15 +3601,17 @@ class AIAgent:
|
|||
``reasoning_content`` on every assistant tool-call message; omitting
|
||||
it causes the next replay to fail with HTTP 400.
|
||||
|
||||
Also detects Kimi models served through third-party providers (e.g.
|
||||
ollama-cloud) by matching ``kimi`` in the model name.
|
||||
Detection is host-driven, not model-name-driven: aggregators like
|
||||
OpenRouter that re-export Kimi/Moonshot models speak their own
|
||||
protocol and reject ``reasoning_content`` echoes. We only enable the
|
||||
kimi-reasoning replay when the request actually targets a
|
||||
kimi/moonshot endpoint or the dedicated kimi-coding provider.
|
||||
"""
|
||||
return (
|
||||
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")
|
||||
or "kimi" in (self.model or "").lower()
|
||||
)
|
||||
|
||||
def _needs_deepseek_tool_reasoning(self) -> bool:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue