fix(vision): add Xiaomi MiMo 'text is not set' to image rejection phrases - #31042
fix(vision): add Xiaomi MiMo 'text is not set' to image rejection phrases#31042vanhci wants to merge 3 commits into
Conversation
WeChat adapter's secondary content-fingerprint dedup was dropping intentionally-repeated slash commands (e.g. /approve sent twice). The dedup layer now skips text starting with '/', allowing commands to be processed regardless of prior dedup state. Fixes #29779
…ases
MiMo v2.5 supports vision but rejects multimodal requests where the
text content part is missing with HTTP 400:
{'error': {'code': '400', 'message': 'Param Incorrect',
'param': 'text is not set'}}
Add this error pattern (and its backtick variant) to the
_IMAGE_REJECTION_PHRASES list so the agent strips images from user
messages and retries in text-only mode, instead of cascading into
compression or context-overflow recovery.
Refs: #27344
jsboige
left a comment
There was a problem hiding this comment.
Clean fix with bonus weixin dedup improvement. Two separate changes:
-
Xiaomi MiMo vision rejection: Adds
text is not setand backtick variant to image rejection phrases. Correct — MiMo rejects image-only requests where no text content part is present. Test coverage includes both variants and a false-negative check. Good. -
WeChat command dedup bypass: Commands starting with
/skip content-fingerprint dedup. Fixes silent dropping of intentionally-repeated slash commands like/approve. Small, targeted, correct.
LGTM.
|
Related to #30682 (same MiMo "text is not set" error). Note: #30259 (merged) already adds reactive recovery for providers rejecting list-type tool content — it strips image parts on failure and retries. This PR adds the error string to the proactive image-rejection phrases list as a complementary fix. Also includes an unrelated WeChat slash-command dedup fix in |
Summary
Adds Xiaomi MiMo's "text is not set" error pattern to the list so the agent strips images from user messages and retries in text-only mode.
Problem
MiMo v2.5 supports vision but rejects multimodal requests where the text content part is missing with HTTP 400:
Without this fix, the agent cascades into compression or context-overflow recovery instead of the correct image-stripping path.
Fix
textis not set" to inTesting
Context
This error was observed when using MiMo v2.5 as the primary model with tool (screenshot analysis). The agent sends multimodal requests with image_url content parts, but MiMo requires a text content part to be present.