Skip to content

fix(run_agent): detect kimi models via model name for reasoning pad#26438

Closed
hermesagent26 wants to merge 1 commit into
NousResearch:mainfrom
hermesagent26:fix-kimi-ollama-cloud-reasoning-pad
Closed

fix(run_agent): detect kimi models via model name for reasoning pad#26438
hermesagent26 wants to merge 1 commit into
NousResearch:mainfrom
hermesagent26:fix-kimi-ollama-cloud-reasoning-pad

Conversation

@hermesagent26

Copy link
Copy Markdown
Contributor

Provider: ollama-cloud
Model: kimi-k2.6
Base URL: https://ollama.com/v1

Bug

in only checked provider ID and base URL. When is served via , provider is and base URL is — both miss the checks. This causes pad to not be injected on assistant messages. Ollama Cloud's Go backend then rejects the replay with:

Fix

Add model-name detection () so any route serving a kimi model gets the required echo-back. Same pattern already used elsewhere for model-family detection.

Test

  • Configure ,
  • Send messages that trigger tool calls
  • Subsequent turns should no longer fail with 400

This also fixes the Telegram 400/401 cascade where kimi-k2.6 via ollama-cloud consistently failed after tool-call turns, causing OpenRouter fallback to activate and fail with 401.

 previously only checked provider ID and
base URL. When kimi-k2.6 is served via ollama-cloud (or any third-party
provider), provider is not 'kimi-coding' and base URL is not
api.kimi.com — so reasoning_content pad was never injected. This caused
HTTP 400 from Ollama Cloud's Go backend: 'invalid message content type:
map[string]interface {}'.

Fix: add model-name detection ('kimi' in model.lower()) so any route
serving a kimi model gets the required reasoning_content echo-back.

Refs the 400/401 Telegram errors where kimi-k2.6 via ollama-cloud
consistently failed after tool-call turns.
@daimon-nous daimon-nous Bot added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent loop, run_agent.py, prompt builder provider/kimi Kimi / Moonshot labels May 15, 2026
teknium1 added a commit that referenced this pull request May 17, 2026
…tors

Adds release-note attribution mappings for 10 contributors from the
low-hanging-fruit salvage group 2 batch:
- @shellybotmoyer (PR #26661, #25576)
- @ether-btc (PR #26632)
- @LifeJiggy (PR #26516)
- @nekwo (PR #26481)
- @flooryyyy (PR #26374)
- @dgians (PR #26034, incl. zealy-tzco bot-committer alias)
- @flanny7 (PR #27030)
- @hermesagent26 (PR #26438)
- @kriscolab (PR #26926, co-author on salvage commit)
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #27292 — your commit was cherry-picked onto current main as part of a batch salvage of low-risk new-contributor PRs. Authorship preserved (fix(run_agent): detect kimi models via model name for reasoning pad). Thanks for the contribution.

@teknium1 teknium1 closed this May 17, 2026
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…tors

Adds release-note attribution mappings for 10 contributors from the
low-hanging-fruit salvage group 2 batch:
- @shellybotmoyer (PR NousResearch#26661, NousResearch#25576)
- @ether-btc (PR NousResearch#26632)
- @LifeJiggy (PR NousResearch#26516)
- @nekwo (PR NousResearch#26481)
- @flooryyyy (PR NousResearch#26374)
- @dgians (PR NousResearch#26034, incl. zealy-tzco bot-committer alias)
- @flanny7 (PR NousResearch#27030)
- @hermesagent26 (PR NousResearch#26438)
- @kriscolab (PR NousResearch#26926, co-author on salvage commit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P2 Medium — degraded but workaround exists provider/kimi Kimi / Moonshot type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants