openclaw - 💡(How to fix) Fix [Bug]: 5.12 strict tool schema injection breaks Xiaomi MiMo custom provider (400 Param Incorrect)

Official PRs (…)
ON THIS PAGE

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…

OpenClaw 2026.5.12 breaks Xiaomi MiMo (token-plan-cn.xiaomimimo.com) custom provider with 400 Param Incorrect on every request that includes tools. The root cause is the new tool schema normalization logic injecting strict: true + additionalProperties: false into function parameters, which the Xiaomi endpoint rejects.

Error Message

error: "LLM request failed: provider rejected the request schema or tool payload." rawErrorPreview: "400 Param Incorrect" providerRuntimeFailureKind: "schema" failoverReason: "format" rawErrorHash: "sha256:5b3c34a67cf5"

Root Cause

The 5.12 changelog states:

"Agents: add permissive items schemas to array tool parameters before provider submission"

The convertTools() function in openai-transport-stream-BWwvx0MZ.js now calls resolveOpenAIStrictToolSetting()resolveOpenAIStrictToolFlagWithDiagnostics()normalizeOpenAIStrictToolParameters(), which adds strict: true to every tool's function definition and rewrites parameters to include additionalProperties: false.

The Xiaomi endpoint (https://token-plan-cn.xiaomimimo.com/v1/chat/completions) does not support strict: true in tool definitions and returns either an empty response (connection drop) or 400 Param Incorrect.

Code Example

error: "LLM request failed: provider rejected the request schema or tool payload."
rawErrorPreview: "400 Param Incorrect"
providerRuntimeFailureKind: "schema"
failoverReason: "format"
rawErrorHash: "sha256:5b3c34a67cf5"

---

curl -X POST "https://token-plan-cn.xiaomimimo.com/v1/chat/completions" \
  -H "Authorization: Bearer <key>" \
  -d '{
    "model": "mimo-v2.5-pro",
    "messages": [{"role": "user", "content": "say ok"}],
    "max_tokens": 10,
    "tools": [{
      "type": "function",
      "function": {
        "name": "test",
        "description": "test",
        "strict": true,
        "parameters": {
          "type": "object",
          "properties": {"x": {"type": "string"}},
          "required": ["x"],
          "additionalProperties": false
        }
      }
    }]
  }'
# → empty response, connection terminated

---

# Same request without "strict": true and "additionalProperties": false
# → normal streaming response with reasoning_content

---

{
  "xiaomi": {
    "baseUrl": "https://token-plan-cn.xiaomimimo.com/v1",
    "api": "openai-completions",
    "apiKey": "<redacted>",
    "models": [
      {
        "id": "mimo-v2.5",
        "name": "MiMo V2.5",
        "reasoning": true,
        "contextWindow": 262144,
        "maxTokens": 8192
      },
      {
        "id": "mimo-v2.5-pro",
        "name": "MiMo V2.5 Pro",
        "reasoning": true,
        "contextWindow": 1048576,
        "maxTokens": 32000
      }
    ]
  }
}
RAW_BUFFERClick to expand / collapse

Summary

OpenClaw 2026.5.12 breaks Xiaomi MiMo (token-plan-cn.xiaomimimo.com) custom provider with 400 Param Incorrect on every request that includes tools. The root cause is the new tool schema normalization logic injecting strict: true + additionalProperties: false into function parameters, which the Xiaomi endpoint rejects.

Root Cause

The 5.12 changelog states:

"Agents: add permissive items schemas to array tool parameters before provider submission"

The convertTools() function in openai-transport-stream-BWwvx0MZ.js now calls resolveOpenAIStrictToolSetting()resolveOpenAIStrictToolFlagWithDiagnostics()normalizeOpenAIStrictToolParameters(), which adds strict: true to every tool's function definition and rewrites parameters to include additionalProperties: false.

The Xiaomi endpoint (https://token-plan-cn.xiaomimimo.com/v1/chat/completions) does not support strict: true in tool definitions and returns either an empty response (connection drop) or 400 Param Incorrect.

Verification

Gateway error log

error: "LLM request failed: provider rejected the request schema or tool payload."
rawErrorPreview: "400 Param Incorrect"
providerRuntimeFailureKind: "schema"
failoverReason: "format"
rawErrorHash: "sha256:5b3c34a67cf5"

Reproduction via curl

With strict: true → FAILS (empty response / connection drop)

curl -X POST "https://token-plan-cn.xiaomimimo.com/v1/chat/completions" \
  -H "Authorization: Bearer <key>" \
  -d '{
    "model": "mimo-v2.5-pro",
    "messages": [{"role": "user", "content": "say ok"}],
    "max_tokens": 10,
    "tools": [{
      "type": "function",
      "function": {
        "name": "test",
        "description": "test",
        "strict": true,
        "parameters": {
          "type": "object",
          "properties": {"x": {"type": "string"}},
          "required": ["x"],
          "additionalProperties": false
        }
      }
    }]
  }'
# → empty response, connection terminated

Without strict: true → SUCCEEDS

# Same request without "strict": true and "additionalProperties": false
# → normal streaming response with reasoning_content

All other parameters tested and working

The following parameters all work fine with the Xiaomi endpoint (tested in isolation and combinations):

  • stream: true
  • stream_options: { include_usage: true }
  • store: false
  • reasoning_effort: "medium"
  • tool_choice: "auto"
  • Content array format (content: [{type: "text", text: "..."}])
  • System prompt + tools + thinking + stream together

Only strict: true on tool function definitions triggers the failure.

Environment

  • OpenClaw version: 2026.5.12 (f066dd2)
  • Provider config:
{
  "xiaomi": {
    "baseUrl": "https://token-plan-cn.xiaomimimo.com/v1",
    "api": "openai-completions",
    "apiKey": "<redacted>",
    "models": [
      {
        "id": "mimo-v2.5",
        "name": "MiMo V2.5",
        "reasoning": true,
        "contextWindow": 262144,
        "maxTokens": 8192
      },
      {
        "id": "mimo-v2.5-pro",
        "name": "MiMo V2.5 Pro",
        "reasoning": true,
        "contextWindow": 1048576,
        "maxTokens": 32000
      }
    ]
  }
}

Expected Fix

Either:

  1. Add a new compat field (e.g., compat.supportsStrictMode: false) at the model level (models.providers.*.models.*.compat) that users can set to opt out of strict tool normalization for custom providers that don't support it.
  2. Or detect that the endpoint is not a native OpenAI endpoint and skip strict tool injection automatically.
  3. Or make strict tool normalization opt-in rather than opt-out for non-OpenAI providers.

Related Issues

  • #81923 — same root cause (tool schema change breaks custom providers in 5.12)
  • #81959 — Xiaomi MiMo broken (same underlying bug, lacks technical detail)

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

openclaw - 💡(How to fix) Fix [Bug]: 5.12 strict tool schema injection breaks Xiaomi MiMo custom provider (400 Param Incorrect)