Skip to content

fix(soul): degrade unsupported tool media instead of aborting mid-task - #2592

Open
rainbowgore wants to merge 1 commit into
MoonshotAI:mainfrom
rainbowgore:fix/2588-capability-error-after-image-tool
Open

fix(soul): degrade unsupported tool media instead of aborting mid-task#2592
rainbowgore wants to merge 1 commit into
MoonshotAI:mainfrom
rainbowgore:fix/2588-capability-error-after-image-tool

Conversation

@rainbowgore

@rainbowgore rainbowgore commented Aug 6, 2026

Copy link
Copy Markdown

Related Issue

Resolve #2588

Description

When a model is configured without capabilities and a tool (including MCP) returns an image, _grow_context used to raise LLMNotSupported after the tool had already run — so earlier side effects were already applied, then the turn aborted. The error also did not say how to fix the config.

This PR:

  • Omits unsupported image/video parts from tool results and continues the turn with a short note that names the config fix (omit_unsupported_media in src/kimi_cli/soul/message.py, used from _grow_context in src/kimi_cli/soul/kimisoul.py).
  • Improves LLMNotSupported so it tells the user to add capabilities = ["…"] to [models.<alias>] (or set KIMI_MODEL_CAPABILITIES).
  • Leaves user/steer media checks unchanged: unsupported user-provided media still raises with the improved message.
  • Updates changelog and EN/ZH user docs (providers, faq) for the new behavior.

Note: #2590 also improves the unsupported-capability error wording only; this PR additionally fixes the mid-task abort after tool side effects. Maintainers may want to reconcile the two error-string variants.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Made with Cursor


Open in Devin Review

When a tool returns image/video the model lacks capability for, omit the
media and continue rather than raising after side effects. Also name the
config remedy in LLMNotSupported errors (MoonshotAI#2588).

Co-authored-by: Cursor <cursoragent@cursor.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

### `image_in`

启用图片输入能力后,可以在对话中粘贴图片(`Ctrl-V`)。
启用图片输入能力后,可以在对话中粘贴图片(`Ctrl-V`),代理也可以将工具(包括 MCP 工具)返回的图片内容发给模型。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Chinese documentation uses a translated word for a term the style guide requires to stay in English

The Chinese providers page describes the agent as "代理" (docs/zh/configuration/providers.md:136), but the documentation term table mandates keeping "Agent" as a proper noun in Chinese, so the wording is inconsistent with the rest of the docs.
Impact: Readers of the Chinese docs see a term that differs from every other page, making the concept harder to recognize.

Term-mapping rule in docs/AGENTS.md

docs/AGENTS.md contains a term mapping table stating Chinese "Agent" ↔ English "agent", with "Proper noun (zh) = yes", meaning the Chinese text must keep the English word Agent rather than translating it to 代理. All other Chinese docs follow this (e.g. 子 Agent).

Suggested change
启用图片输入能力后,可以在对话中粘贴图片(`Ctrl-V`),代理也可以将工具(包括 MCP 工具)返回的图片内容发给模型。
启用图片输入能力后,可以在对话中粘贴图片(`Ctrl-V`),Agent 也可以将工具(包括 MCP 工具)返回的图片内容发给模型。
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model declared without capabilities: an image-returning MCP tool aborts the run mid-task, after side effects, with no hint at the fix

1 participant