feat(providers): add MiniMax-M3.1-Flash and avoid reasoning_split=false (#6360)
Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
This commit is contained in:
1 parent
c20a0dad70
commit
0254bf1217
2 files changed
+40
-3
No files matched your search
@@ -752,6 +752,21 @@ PROVIDERS: tuple[ProviderSpec, ...] = (
|
||||
backend="openai_compat",
|
||||
default_api_base="https://api.minimax.io/v1",
|
||||
thinking_style="reasoning_split",
|
||||
builtin_models=(
|
||||
ProviderModelSpec(
|
||||
id="MiniMax-M3.1-Flash",
|
||||
label="MiniMax-M3.1-Flash",
|
||||
aliases=("minimax-m3.1-flash",),
|
||||
context_window=1_000_000,
|
||||
reasoning_efforts=("low", "medium", "high", "xhigh", "max"),
|
||||
default_reasoning_effort="max",
|
||||
input_modalities=("text", "image"),
|
||||
),
|
||||
),
|
||||
reasoning_effort_remap=(
|
||||
("none", "low"), ("minimal", "low"),
|
||||
("low", "low"), ("medium", "medium"), ("high", "high"),
|
||||
),
|
||||
),
|
||||
# MiniMax Anthropic-compatible endpoint: supports thinking mode
|
||||
ProviderSpec(
|
||||
|
||||
@@ -1455,9 +1455,31 @@ def test_minimax_reasoning_split_enabled_with_reasoning_effort() -> None:
|
||||
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}
|
||||
@pytest.mark.parametrize("model", ["MiniMax-M2.7", "MiniMax-M3.1-Flash"])
|
||||
@pytest.mark.parametrize("effort", ["none", "minimal"])
|
||||
def test_minimax_off_presets_map_to_low_effort(model, effort) -> None:
|
||||
# MiniMax-M3.1-Flash returns HTTP 400 for reasoning_split=false.
|
||||
kw = _build_kwargs_for("minimax", model, reasoning_effort=effort)
|
||||
assert kw["reasoning_effort"] == "low"
|
||||
assert kw["extra_body"] == {"reasoning_split": True}
|
||||
|
||||
|
||||
@pytest.mark.parametrize("model", ["MiniMax-M2.7", "MiniMax-M3"])
|
||||
def test_minimax_effort_menu_unchanged_for_models_without_metadata(model) -> None:
|
||||
from nanobot.webui.settings_models import reasoning_effort_values_for
|
||||
|
||||
assert reasoning_effort_values_for("minimax", model) == ["", "low", "medium", "high"]
|
||||
|
||||
|
||||
def test_minimax_m31_flash_builtin_metadata() -> None:
|
||||
from nanobot.providers.registry import find_by_name
|
||||
|
||||
meta = find_by_name("minimax").model_metadata("MiniMax-M3.1-Flash")
|
||||
assert meta is not None
|
||||
assert meta.context_window == 1_000_000
|
||||
assert meta.reasoning_efforts == ("low", "medium", "high", "xhigh", "max")
|
||||
assert meta.default_reasoning_effort == "max"
|
||||
assert meta.input_modalities == ("text", "image")
|
||||
|
||||
|
||||
def test_volcengine_thinking_enabled() -> None:
|
||||
|
||||
Reference in new issue
Block a user