Skip to content

Your lightweight open-source personal agent.

fix: map MiniMax reasoning_effort to reasoning_split

ke5b288c6ebe2
diff --git a/nanobot/providers/openai_compat_provider.py b/nanobot/providers/openai_compat_provider.py
index 2ffc7c588..e5cac8765 100644
--- a/nanobot/providers/openai_compat_provider.py
+++ b/nanobot/providers/openai_compat_provider.py
@@ -398,6 +398,8 @@ class OpenAICompatProvider(LLMProvider):
extra: dict[str, Any] | None = None
if spec.name == "dashscope":
extra = {"enable_thinking": thinking_enabled}
+ elif spec.name == "minimax":
+ extra = {"reasoning_split": thinking_enabled}
elif spec.name in (
"volcengine", "volcengine_coding_plan",
"byteplus", "byteplus_coding_plan",
diff --git a/tests/providers/test_litellm_kwargs.py b/tests/providers/test_litellm_kwargs.py
index 0d6280b7d..a12aa9fbb 100644
--- a/tests/providers/test_litellm_kwargs.py
+++ b/tests/providers/test_litellm_kwargs.py
@@ -740,6 +740,21 @@ def test_dashscope_no_extra_body_when_reasoning_effort_none() -> None:
assert "extra_body" not in kw
+def test_minimax_reasoning_split_enabled_with_reasoning_effort() -> None:
+ kw = _build_kwargs_for("minimax", "MiniMax-M2.7", reasoning_effort="medium")
+ assert kw["extra_body"] == {"reasoning_split": True}
+
+
+def test_minimax_reasoning_split_disabled_for_minimal() -> None:
+ kw = _build_kwargs_for("minimax", "MiniMax-M2.7", reasoning_effort="minimal")
+ assert kw["extra_body"] == {"reasoning_split": False}
+
+
+def test_minimax_no_extra_body_when_reasoning_effort_none() -> None:
+ kw = _build_kwargs_for("minimax", "MiniMax-M2.7", reasoning_effort=None)
+ assert "extra_body" not in kw
+
+
def test_volcengine_thinking_enabled() -> None:
kw = _build_kwargs_for("volcengine", "doubao-seed-2-0-pro", reasoning_effort="high")
assert kw["extra_body"] == {"thinking": {"type": "enabled"}}