feat: add Xiaomi MiMo v2.5-pro and v2.5 model support (#14635)
## Merged Adds MiMo v2.5-pro and v2.5 support to Xiaomi native provider, OpenCode Go, and setup wizard. ### Changes - Context lengths: added v2.5-pro (1M) and v2.5 (1M), corrected existing MiMo entries to exact values (262144) - Provider lists: xiaomi, opencode-go, setup wizard - Vision: upgraded from mimo-v2-omni to mimo-v2.5 (omnimodal) - Config description updated for XIAOMI_API_KEY - Tests updated for new vision model preference ### Verification - 4322 tests passed, 0 new regressions - Live API tested on Xiaomi portal: basic, reasoning, tool calling, multi-tool, file ops, system prompt, vision — all pass - Self-review found and fixed 2 issues (redundant vision check, stale HuggingFace context length)
This commit is contained in:
@@ -245,7 +245,7 @@ class TestResolveVisionMainFirst:
|
||||
assert model == "xiaomi/mimo-v2-omni"
|
||||
|
||||
def test_exotic_provider_with_vision_override_preserved(self):
|
||||
"""xiaomi → mimo-v2-omni override still wins over main_model."""
|
||||
"""xiaomi → mimo-v2.5 override still wins over main_model."""
|
||||
with patch(
|
||||
"agent.auxiliary_client._read_main_provider", return_value="xiaomi",
|
||||
), patch(
|
||||
@@ -257,15 +257,15 @@ class TestResolveVisionMainFirst:
|
||||
"agent.auxiliary_client._resolve_task_provider_model",
|
||||
return_value=("auto", None, None, None, None),
|
||||
):
|
||||
mock_resolve.return_value = (MagicMock(), "mimo-v2-omni")
|
||||
mock_resolve.return_value = (MagicMock(), "mimo-v2.5")
|
||||
|
||||
from agent.auxiliary_client import resolve_vision_provider_client
|
||||
|
||||
provider, client, model = resolve_vision_provider_client()
|
||||
|
||||
assert provider == "xiaomi"
|
||||
# Should use mimo-v2-omni (vision override), not mimo-v2-pro (text main)
|
||||
assert mock_resolve.call_args.args[1] == "mimo-v2-omni"
|
||||
# Should use mimo-v2.5 (vision override), not mimo-v2-pro (text main)
|
||||
assert mock_resolve.call_args.args[1] == "mimo-v2.5"
|
||||
|
||||
def test_main_unavailable_vision_falls_through_to_aggregators(self):
|
||||
"""Main provider fails → fall back to OpenRouter/Nous strict backends."""
|
||||
|
||||
@@ -287,10 +287,10 @@ class TestXiaomiAuxiliary:
|
||||
assert "xiaomi" not in _API_KEY_PROVIDER_AUX_MODELS
|
||||
|
||||
def test_vision_model_override(self):
|
||||
"""Xiaomi vision tasks should use mimo-v2-omni (multimodal), not the main model."""
|
||||
"""Xiaomi vision tasks should use mimo-v2.5 (multimodal), not the main model."""
|
||||
from agent.auxiliary_client import _PROVIDER_VISION_MODELS
|
||||
assert "xiaomi" in _PROVIDER_VISION_MODELS
|
||||
assert _PROVIDER_VISION_MODELS["xiaomi"] == "mimo-v2-omni"
|
||||
assert _PROVIDER_VISION_MODELS["xiaomi"] == "mimo-v2.5"
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user