fix: map MiniMax reasoning_effort to reasoning_split
This commit is contained in:
@@ -398,6 +398,8 @@ class OpenAICompatProvider(LLMProvider):
|
|||||||
extra: dict[str, Any] | None = None
|
extra: dict[str, Any] | None = None
|
||||||
if spec.name == "dashscope":
|
if spec.name == "dashscope":
|
||||||
extra = {"enable_thinking": thinking_enabled}
|
extra = {"enable_thinking": thinking_enabled}
|
||||||
|
elif spec.name == "minimax":
|
||||||
|
extra = {"reasoning_split": thinking_enabled}
|
||||||
elif spec.name in (
|
elif spec.name in (
|
||||||
"volcengine", "volcengine_coding_plan",
|
"volcengine", "volcengine_coding_plan",
|
||||||
"byteplus", "byteplus_coding_plan",
|
"byteplus", "byteplus_coding_plan",
|
||||||
|
|||||||
@@ -740,6 +740,21 @@ def test_dashscope_no_extra_body_when_reasoning_effort_none() -> None:
|
|||||||
assert "extra_body" not in kw
|
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:
|
def test_volcengine_thinking_enabled() -> None:
|
||||||
kw = _build_kwargs_for("volcengine", "doubao-seed-2-0-pro", reasoning_effort="high")
|
kw = _build_kwargs_for("volcengine", "doubao-seed-2-0-pro", reasoning_effort="high")
|
||||||
assert kw["extra_body"] == {"thinking": {"type": "enabled"}}
|
assert kw["extra_body"] == {"thinking": {"type": "enabled"}}
|
||||||
|
|||||||
Reference in New Issue
Block a user