Skip to content

fix(vlm): send MiMo thinking parameter as object format#2477

Open
LllYuu0392 wants to merge 1 commit into
volcengine:mainfrom
LllYuu0392:fix/mimo-thinking-param
Open

fix(vlm): send MiMo thinking parameter as object format#2477
LllYuu0392 wants to merge 1 commit into
volcengine:mainfrom
LllYuu0392:fix/mimo-thinking-param

Conversation

@LllYuu0392

Copy link
Copy Markdown

Problem

Xiaomi MiMo API (mimo-v2.5 / mimo-v2.5-pro) requires the thinking parameter as an object:

{thinking: {type: disabled}}

The current _apply_provider_specific_extra_body() only handles DashScope's enable_thinking boolean parameter. For MiMo endpoints, no thinking-related parameter is sent, causing MiMo to default to thinking: enabled. When thinking is enabled, MiMo returns the actual response in reasoning_content while content is empty — breaking VLM memory extraction silently.

Fix

  • Add _is_mimo_endpoint() method to detect xiaomimimo.com hosts (consistent with existing _supports_enable_thinking() pattern)
  • In _apply_provider_specific_extra_body(), send {thinking: {type: disabled}} for MiMo endpoints when thinking is disabled

Testing

Verified with mimo-v2.5 API:

thinking: {type: disabled} → content: 1+1等于2。 ✅ reasoning_content: (empty) ✅
thinking: {type: enabled}  → content:            reasoning_content: ... ✅

Without this patch, no thinking parameter is sent and MiMo defaults to enabled, causing empty content for all VLM extractions.

Xiaomi MiMo API requires the thinking parameter as an object
({"type": "enabled"|"disabled"}) rather than a boolean.
Without this fix, _apply_provider_specific_extra_body() only handles
DashScope's enable_thinking and ignores MiMo entirely, causing MiMo
to default to thinking=enabled and return empty content field.

- Add _is_mimo_endpoint() to detect xiaomimimo.com hosts
- Send {"thinking": {"type": "disabled"}} for MiMo endpoints
@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🏅 Score: 95
🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

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

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant