Problem
Third-party models (MiniMax M2.5, Moonshot Kimi K2.5) leak their internal thinking/reasoning process into the text content of responses. This is not in a structured thinking or reasoning_content field — it's raw text mixed into the actual reply, making it visible to end users.
Current Behavior
MiniMax M2.5
- Thinking content appears directly in text, sometimes with
<think> tags, sometimes without any tags (plain English reasoning mixed with Chinese reply)
- No API parameter exists to disable thinking
reasoning: true/false in OpenClaw config only controls whether OpenClaw recognizes thinking blocks, not whether the model generates them
- Gateway's
stripThinkingTagsFromText only handles tagged thinking — untagged thinking leaks through
Moonshot Kimi K2.5
- Similar leaking behavior
- Does support
thinking: { type: "disabled" } API parameter to suppress thinking at the source
- But OpenClaw has no way to configure this per-model in
openclaw.json
What We Tried (and failed)
reasoning: true/false in model config → only controls OpenClaw's parsing, not model behavior
- Agent
identity field → no effect on thinking
- SOUL.md prompt constraints ("don't show thinking") → models ignore this
- Manual
params.thinking = { type: "disabled" } in openclaw.json → works for Kimi, but no equivalent for MiniMax
Suggested Improvements
1. Per-model thinking control in config
{
"models": {
"moonshot/kimi-k2.5": {
"thinking": { "type": "disabled" } // passed to API
},
"mm/MiniMax-M2.5": {
"thinking": { "type": "strip" } // post-process strip
}
}
}
2. Robust post-processing strip
Current stripThinkingTagsFromText only handles <think>...</think> tags. Need:
- Strip
<think> tagged blocks (existing)
- Strip untagged thinking by pattern detection (e.g., lines starting with "Let me think...", "I need to consider...", reasoning chains in English followed by Chinese reply)
- Configurable per-model:
"strip" (aggressive post-process), "disabled" (API param), "allow" (show thinking), "auto" (use API param if available, else strip)
3. Provider-aware thinking parameters
Different providers have different API parameters:
- Moonshot:
thinking: { type: "disabled" }
- Anthropic: handled natively
- MiniMax: no API support — must post-process
- OpenAI-compatible: varies
OpenClaw should map the generic thinking config to the correct provider-specific API parameter.
Impact
Users switching between models get unpredictable UX — some models dump English reasoning chains into group chats. We spent 2 days building workarounds (regex pattern detection, per-model prompt hacks) that should be handled at the framework level.
Environment
- OpenClaw 2026.3.13
- Affected models: mm/MiniMax-M2.5, moonshot/kimi-k2.5
- Not affected: anthropic/claude, xai/grok (handle thinking properly)
Problem
Third-party models (MiniMax M2.5, Moonshot Kimi K2.5) leak their internal thinking/reasoning process into the
textcontent of responses. This is not in a structuredthinkingorreasoning_contentfield — it's raw text mixed into the actual reply, making it visible to end users.Current Behavior
MiniMax M2.5
<think>tags, sometimes without any tags (plain English reasoning mixed with Chinese reply)reasoning: true/falsein OpenClaw config only controls whether OpenClaw recognizes thinking blocks, not whether the model generates themstripThinkingTagsFromTextonly handles tagged thinking — untagged thinking leaks throughMoonshot Kimi K2.5
thinking: { type: "disabled" }API parameter to suppress thinking at the sourceopenclaw.jsonWhat We Tried (and failed)
reasoning: true/falsein model config → only controls OpenClaw's parsing, not model behavioridentityfield → no effect on thinkingparams.thinking = { type: "disabled" }inopenclaw.json→ works for Kimi, but no equivalent for MiniMaxSuggested Improvements
1. Per-model thinking control in config
{ "models": { "moonshot/kimi-k2.5": { "thinking": { "type": "disabled" } // passed to API }, "mm/MiniMax-M2.5": { "thinking": { "type": "strip" } // post-process strip } } }2. Robust post-processing strip
Current
stripThinkingTagsFromTextonly handles<think>...</think>tags. Need:<think>tagged blocks (existing)"strip"(aggressive post-process),"disabled"(API param),"allow"(show thinking),"auto"(use API param if available, else strip)3. Provider-aware thinking parameters
Different providers have different API parameters:
thinking: { type: "disabled" }OpenClaw should map the generic
thinkingconfig to the correct provider-specific API parameter.Impact
Users switching between models get unpredictable UX — some models dump English reasoning chains into group chats. We spent 2 days building workarounds (regex pattern detection, per-model prompt hacks) that should be handled at the framework level.
Environment