openclaw - ✅(Solved) Fix [Bug] MiniMax-M2.7 image understanding not working - isMinimaxVlmModel hardcoded to only accept MiniMax-VL-01 [2 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#69648Fetched 2026-04-22 07:49:45
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
cross-referenced ×2referenced ×2

Error Message

Image model failed (minimax/MiniMax-M2.7): 400 {"type":"error","error":{"type":"invalid_request_error","message":"invalid params, chat content is empty (2013)"}}

Fix Action

Fixed

PR fix notes

PR #69691: fix(minimax): add MiniMax-M2.7 to VLM model allowlist

Description (problem / solution / changelog)

MiniMax-M2.7 supports image understanding via the VLM endpoint (/v1/coding_plan/vlm) but was excluded by the hardcoded check that only accepted MiniMax-VL-01.

This PR adds MiniMax-M2.7 to the MINIMAX_VLM_MODELS allowlist and updates tests.

Closes #69648

Changed files

  • src/agents/minimax-vlm.normalizes-api-key.test.ts (modified, +6/-0)
  • src/agents/minimax-vlm.ts (modified, +4/-1)

PR #69728: fix(minimax): recognize MiniMax-M2.7 as VLM-capable model

Description (problem / solution / changelog)

Fixes #69648

MiniMax-M2.7 supports image understanding via the /v1/coding_plan/vlm endpoint, but isMinimaxVlmModel() only recognized MiniMax-VL-01. This caused M2.7 to be incorrectly routed to the generic anthropic-messages API path, producing:

Image model failed (minimax/MiniMax-M2.7): 400 {"type":"error","error":{"type":"invalid_request_error","message":"invalid params, chat content is empty (2013)"}}

Fix: Replace the hard-coded single-model check with a Set lookup that includes both MiniMax-VL-01 and MiniMax-M2.7.

Test coverage: Updated existing isMinimaxVlmModel test to assert both models are recognized and non-MiniMax providers are still rejected.

Changed files

  • src/agents/minimax-vlm.normalizes-api-key.test.ts (modified, +4/-1)
  • src/agents/minimax-vlm.ts (modified, +6/-1)

Code Example

Image model failed (minimax/MiniMax-M2.7): 400 {"type":"error","error":{"type":"invalid_request_error","message":"invalid params, chat content is empty (2013)"}}

---

function isMinimaxVlmModel(provider, modelId) {
    return isMinimaxVlmProvider(provider) && modelId.trim() === "MiniMax-VL-01";
}

---

POST https://api.minimaxi.com/v1/coding_plan/vlm
Authorization: Bearer {API_KEY}
{
  "prompt": "描述这张图片的内容",
  "image_url": "data:image/png;base64,..."
}
RAW_BUFFERClick to expand / collapse

问题描述

MiniMax-M2.7 模型具备图片理解能力(MiniMax 官方文档确认),且通过直接 API 调用 /v1/coding_plan/vlm 已验证可用,但 OpenClaw 的 image 工具返回错误:

Image model failed (minimax/MiniMax-M2.7): 400 {"type":"error","error":{"type":"invalid_request_error","message":"invalid params, chat content is empty (2013)"}}

根本原因

minimax-vlm--JDeh9fW.js 中,函数 isMinimaxVlmModel 的判断逻辑硬编码为:

function isMinimaxVlmModel(provider, modelId) {
    return isMinimaxVlmProvider(provider) && modelId.trim() === "MiniMax-VL-01";
}

只有 MiniMax-VL-01 会走 VLM fallback 路径,而 MiniMax-M2.7 不匹配这个条件,被错误地路由到普通 anthropic-messages API,该 API 对 M2.7 不支持图片输入。

实际验证

直接调用 MiniMax VLM 端点(绕开 OpenClaw 逻辑)完全成功:

POST https://api.minimaxi.com/v1/coding_plan/vlm
Authorization: Bearer {API_KEY}
{
  "prompt": "描述这张图片的内容",
  "image_url": "data:image/png;base64,..."
}

返回结果: 成功识别图片内容

证据

  • models.jsonMiniMax-M2.7 配置了 "input": ["text", "image"]
  • 直接 API 调用 VLM 端点成功 ✅
  • OpenClaw image 工具失败 ❌
  • isMinimaxVlmModel 只认 MiniMax-VL-01 ❌(硬编码 bug)

期望行为

MiniMax-M2.7 应该被识别为支持图片理解的模型,自动路由到 /v1/coding_plan/vlm VLM 端点。

环境信息

  • OpenClaw: 2026.4.15
  • Node: v24.15.0
  • OS: Darwin arm64
  • 模型: minimax/MiniMax-M2.7

建议修复方案

  1. 修改 isMinimaxVlmModel 函数,将 MiniMax-M2.7 也纳入 VLM 模型判断
  2. 或者将 MiniMax-VL-01MiniMax-M2.7 都标记为支持图片理解

extent analysis

TL;DR

Modify the isMinimaxVlmModel function to include MiniMax-M2.7 in the VLM model judgment to fix the routing issue.

Guidance

  • Update the isMinimaxVlmModel function to check for MiniMax-M2.7 in addition to MiniMax-VL-01 to ensure correct routing to the VLM endpoint.
  • Verify the fix by testing the OpenClaw image tool with the updated function to confirm that MiniMax-M2.7 is correctly identified as a VLM model.
  • Consider updating the models.json configuration to explicitly mark MiniMax-M2.7 as a VLM model for future reference.
  • Test the API call to /v1/coding_plan/vlm with the updated configuration to ensure that image understanding works as expected.

Example

function isMinimaxVlmModel(provider, modelId) {
    return isMinimaxVlmProvider(provider) && (modelId.trim() === "MiniMax-VL-01" || modelId.trim() === "MiniMax-M2.7");
}

Notes

The fix assumes that the isMinimaxVlmModel function is the sole determining factor for routing to the VLM endpoint. If other factors are at play, additional modifications may be necessary.

Recommendation

Apply the workaround by modifying the isMinimaxVlmModel function to include MiniMax-M2.7 in the VLM model judgment, as this directly addresses the identified issue and allows for correct routing to the VLM endpoint.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING