openclaw - 💡(How to fix) Fix Feature Request: Support custom reasoning language / 中文推理语言支持 [1 comments, 2 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#51521Fetched 2026-04-08 01:10:03
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
commented ×1mentioned ×1subscribed ×1

Root Cause

The regular text output respects the conversation language, but the internal reasoning/thinking stream does not. For users who rely on the reasoning stream to understand how the model thinks (visible via `/reasoning`), having it in English creates a language barrier.

RAW_BUFFERClick to expand / collapse

Feature Request: Support custom reasoning language

Problem

When using OpenClaw with models that support chain-of-thought reasoning (e.g. MiniMax M2.7, Claude, etc.), the thinking/reasoning stream output is always in English, regardless of the user's preferred language.

This is a problem for non-English speakers who want to understand the model's reasoning process in their native language (e.g. Chinese).

Expected Behavior

Users should be able to configure a custom reasoning language, such as:

  • Setting a system prompt directive like "Always think and reason in Chinese"
  • Or a dedicated config option like agents.defaults.reasoningLanguage: "zh-CN"

So that the streaming reasoning output displays in the user's preferred language.

Why This Matters

The regular text output respects the conversation language, but the internal reasoning/thinking stream does not. For users who rely on the reasoning stream to understand how the model thinks (visible via `/reasoning`), having it in English creates a language barrier.

Proposed Solution

  1. Add an optional `agents.defaults.reasoningLanguage` config field
  2. When set, inject a system prompt directive like "Think and reason in [language]" into the reasoning prompt
  3. Alternatively, allow users to customize the reasoning system prompt directly

Additional Context

  • OpenClaw version: latest
  • Channel: Feishu (but issue applies to all channels)
  • Model: MiniMax M2.7-highspeed (confirmed: reasoning stream is English only)

Related: The System Prompt documentation shows that reasoning level is passed as metadata only — there's no customization hook for reasoning language today.

extent analysis

Fix Plan

To support custom reasoning language, we will implement the following steps:

  • Add an optional agents.defaults.reasoningLanguage config field
  • Inject a system prompt directive with the custom language into the reasoning prompt
  • Allow users to customize the reasoning system prompt directly

Example Code

# Add optional config field
class AgentConfig:
    def __init__(self, reasoning_language=None):
        self.reasoning_language = reasoning_language

# Inject system prompt directive
def get_reasoning_prompt(reasoning_language):
    if reasoning_language:
        return f"Think and reason in {reasoning_language}"
    return ""

# Customize reasoning system prompt
def customize_reasoning_prompt(prompt, reasoning_language):
    if reasoning_language:
        return f"{prompt} Think and reason in {reasoning_language}"
    return prompt

# Usage example
agent_config = AgentConfig(reasoning_language="zh-CN")
reasoning_prompt = get_reasoning_prompt(agent_config.reasoning_language)
customized_prompt = customize_reasoning_prompt("/reasoning", agent_config.reasoning_language)

Verification

To verify the fix, test the following scenarios:

  • Set agents.defaults.reasoningLanguage to a custom language (e.g. "zh-CN") and check if the reasoning stream output is in the correct language
  • Customize the reasoning system prompt directly and check if the output reflects the changes
  • Test with different models and channels to ensure the fix is applied universally

Extra Tips

  • Ensure that the custom language is properly supported by the model and the system
  • Consider adding a fallback mechanism for cases where the custom language is not supported
  • Document the new config field and customization options in the System Prompt documentation

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 Feature Request: Support custom reasoning language / 中文推理语言支持 [1 comments, 2 participants]