Skip to content

Commit b17e76b

Browse files
authored
Merge pull request #1047 from octo-patch/feature/upgrade-minimax-m27
feat: upgrade MiniMax default model to M2.7
2 parents 1c21e5a + f47be50 commit b17e76b

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

scrapegraphai/helpers/models_tokens.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@
378378
"grok-beta": 128000,
379379
},
380380
"minimax": {
381+
"MiniMax-M2.7": 204000,
382+
"MiniMax-M2.7-highspeed": 204000,
381383
"MiniMax-M1": 1000000,
382384
"MiniMax-M1-40k": 40000,
383385
"MiniMax-M2": 204000,

tests/test_minimax_models.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
"""Tests for MiniMax model configuration."""
2+
3+
import importlib.util
4+
import os
5+
import sys
6+
7+
import pytest
8+
9+
10+
@pytest.fixture(scope="module")
11+
def models_tokens():
12+
"""Import models_tokens directly to avoid triggering the full package init."""
13+
spec = importlib.util.spec_from_file_location(
14+
"models_tokens",
15+
os.path.join(
16+
os.path.dirname(__file__),
17+
"..",
18+
"scrapegraphai",
19+
"helpers",
20+
"models_tokens.py",
21+
),
22+
)
23+
module = importlib.util.module_from_spec(spec)
24+
spec.loader.exec_module(module)
25+
return module.models_tokens
26+
27+
28+
def test_minimax_m27_in_model_list(models_tokens):
29+
"""MiniMax-M2.7 and MiniMax-M2.7-highspeed should be in the model list."""
30+
minimax_models = models_tokens["minimax"]
31+
assert "MiniMax-M2.7" in minimax_models
32+
assert "MiniMax-M2.7-highspeed" in minimax_models
33+
34+
35+
def test_minimax_m27_listed_first(models_tokens):
36+
"""MiniMax-M2.7 should be the first model in the minimax dict."""
37+
minimax_models = list(models_tokens["minimax"].keys())
38+
assert minimax_models[0] == "MiniMax-M2.7"
39+
assert minimax_models[1] == "MiniMax-M2.7-highspeed"
40+
41+
42+
def test_minimax_old_models_still_present(models_tokens):
43+
"""All previous MiniMax models should still be available."""
44+
minimax_models = models_tokens["minimax"]
45+
assert "MiniMax-M2.5" in minimax_models
46+
assert "MiniMax-M2.5-highspeed" in minimax_models
47+
assert "MiniMax-M2" in minimax_models
48+
assert "MiniMax-M1" in minimax_models
49+
50+
51+
def test_minimax_m27_token_limits(models_tokens):
52+
"""MiniMax-M2.7 models should have correct token limits."""
53+
minimax_models = models_tokens["minimax"]
54+
assert minimax_models["MiniMax-M2.7"] == 204000
55+
assert minimax_models["MiniMax-M2.7-highspeed"] == 204000

0 commit comments

Comments
 (0)