Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scrapegraphai/helpers/models_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@
"grok-beta": 128000,
},
"minimax": {
"MiniMax-M3": 524288,
"MiniMax-M3": 1000000,
"MiniMax-M2.7": 204000,
"MiniMax-M2.7-highspeed": 204000,
},
Expand Down
2 changes: 2 additions & 0 deletions scrapegraphai/utils/model_costs.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"amazon.titan-text-express-v1": 0.0002,
"amazon.titan-text-lite-v1": 0.00015,
"amazon.titan-text-premier-v1:0": 0.0005,
"MiniMax-M3": 0.0006,
}

"""
Expand Down Expand Up @@ -102,4 +103,5 @@
"amazon.titan-text-express-v1": 0.0006,
"amazon.titan-text-lite-v1": 0.0002,
"amazon.titan-text-premier-v1:0": 0.0015,
"MiniMax-M3": 0.0024,
}
26 changes: 25 additions & 1 deletion tests/test_minimax_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ def models_tokens():
return module.models_tokens


@pytest.fixture(scope="module")
def model_costs():
"""Import model_costs directly to avoid triggering the full package init."""
spec = importlib.util.spec_from_file_location(
"model_costs",
os.path.join(
os.path.dirname(__file__),
"..",
"scrapegraphai",
"utils",
"model_costs.py",
),
)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
return module


def test_minimax_m3_in_model_list(models_tokens):
"""MiniMax-M3 should be in the model list."""
minimax_models = models_tokens["minimax"]
Expand Down Expand Up @@ -57,6 +75,12 @@ def test_minimax_deprecated_models_removed(models_tokens):
def test_minimax_token_limits(models_tokens):
"""MiniMax model token limits should match upstream documentation."""
minimax_models = models_tokens["minimax"]
assert minimax_models["MiniMax-M3"] == 524288
assert minimax_models["MiniMax-M3"] == 1000000
assert minimax_models["MiniMax-M2.7"] == 204000
assert minimax_models["MiniMax-M2.7-highspeed"] == 204000


def test_minimax_m3_cost(model_costs):
"""MiniMax-M3 pricing should match upstream documentation."""
assert model_costs.MODEL_COST_PER_1K_TOKENS_INPUT["MiniMax-M3"] == 0.0006
assert model_costs.MODEL_COST_PER_1K_TOKENS_OUTPUT["MiniMax-M3"] == 0.0024
Loading