fix(soul): degrade unsupported tool media instead of aborting mid-task - #2592
fix(soul): degrade unsupported tool media instead of aborting mid-task#2592rainbowgore wants to merge 1 commit into
Conversation
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>
| ### `image_in` | ||
|
|
||
| 启用图片输入能力后,可以在对话中粘贴图片(`Ctrl-V`)。 | ||
| 启用图片输入能力后,可以在对话中粘贴图片(`Ctrl-V`),代理也可以将工具(包括 MCP 工具)返回的图片内容发给模型。 |
There was a problem hiding this comment.
🟡 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).
| 启用图片输入能力后,可以在对话中粘贴图片(`Ctrl-V`),代理也可以将工具(包括 MCP 工具)返回的图片内容发给模型。 | |
| 启用图片输入能力后,可以在对话中粘贴图片(`Ctrl-V`),Agent 也可以将工具(包括 MCP 工具)返回的图片内容发给模型。 |
Was this helpful? React with 👍 or 👎 to provide feedback.
Related Issue
Resolve #2588
Description
When a model is configured without
capabilitiesand a tool (including MCP) returns an image,_grow_contextused to raiseLLMNotSupportedafter 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:
omit_unsupported_mediainsrc/kimi_cli/soul/message.py, used from_grow_contextinsrc/kimi_cli/soul/kimisoul.py).LLMNotSupportedso it tells the user to addcapabilities = ["…"]to[models.<alias>](or setKIMI_MODEL_CAPABILITIES).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
make gen-changelogto update the changelog.make gen-docsto update the user documentation.Made with Cursor