Skip to content

[Model BadCase]: Openclaw使用minimax2.5模型对话概率报错Cannot read properties of undefined (reading 'type') #118

@carotte-tomato

Description

@carotte-tomato

Basic Information - Models Used

MiniMax-M2.5

Information about environment and deployment

  • OS: Windows 11
  • Openclaw: v2026.3.13
  • Model: Minimax-m2.5

Description

openclaw版本3.13,用minimax模型对话,概率报错
minimax2.5返回的anthropic协议不对,openclaw解析失败直接报错了
{"type":"message","id":"6c0ee163","parentId":"6bebb5ce","timestamp":"2026-04-30T02:13:23.975Z","message":{"role":"user","content":[{"type":"text","text":"Sender (untrusted metadata):\njson\n{\n \"label\": \"荣耀Magic V Flip2 (openclaw-android)\",\n \"id\": \"openclaw-android\",\n \"name\": \"荣耀Magic V Flip2\",\n \"username\": \"荣耀Magic V Flip2\"\n}\n\n\n[Thu 2026-04-30 10:13 GMT+8] 打开手电筒"}],"timestamp":1777515203967}}
{"type":"message","id":"570d2fda","parentId":"6c0ee163","timestamp":"2026-04-30T02:13:46.093Z","message":{"role":"assistant","content":[],"api":"anthropic-messages","provider":"mini_max-cn","model":"MiniMax-M2.5","usage":{"input":10907,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":10907,"cost":{"input":0.0032721,"output":0,"cacheRead":0,"cacheWrite":0,"total":0.0032721}},"stopReason":"error","timestamp":1777515203972,"errorMessage":"Cannot read properties of undefined (reading 'type')"}}

补充openclaw的日志,记录协议信息,发现minimax模型返回的协议不能完成遵循anthropic的协议

当前对话消息流程:
event #1: message_start ← 正常
event #2: content_block_delta (signature_delta, index=0) ← 跳过了 content_block_start!
→ SDK 内部崩溃:Cannot read properties of undefined (reading 'type')
MiniMax 的 Anthropic 兼容层有 bug——它在 message_start 之后直接发送了 signature_delta,没有先发 content_block_start 来建立 thinking block。这导致 @anthropic-ai/sdk 的 MessageStream 在内部处理时找不到对应的 content block,访问了 undefined.type。
这个崩溃发生在 SDK 内部的异步迭代器里,pi-ai 的 for await 循环根本没机会处理这个 event,直接被 catch 捕获。

从而导致openclaw对话直接报错。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions