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 docs/components/llms/models/minimax.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ config = {
"llm": {
"provider": "minimax",
"config": {
"model": "MiniMax-M2.7", # default model
"model": "MiniMax-M3", # default model
"temperature": 0.2,
"max_tokens": 2000,
"top_p": 1.0
Expand Down
2 changes: 1 addition & 1 deletion mem0/llms/minimax.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, config: Optional[Union[BaseLlmConfig, MinimaxConfig, Dict]] =
super().__init__(config)

if not self.config.model:
self.config.model = "MiniMax-M2.7"
self.config.model = "MiniMax-M3"

api_key = self.config.api_key or os.getenv("MINIMAX_API_KEY")
base_url = (
Expand Down
11 changes: 9 additions & 2 deletions tests/llms/test_minimax.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ def test_minimax_llm_config_base_url():


def test_minimax_llm_default_model(mock_minimax_client):
"""Default model is MiniMax-M2.7 when not specified."""
"""Default model is MiniMax-M3 when not specified."""
config = MinimaxConfig(temperature=0.7, max_tokens=100, api_key="api_key")
llm = MiniMaxLLM(config)
assert llm.config.model == "MiniMax-M2.7"
assert llm.config.model == "MiniMax-M3"


def test_minimax_llm_env_api_key():
Expand Down Expand Up @@ -192,3 +192,10 @@ def test_factory_creates_minimax_llm(mock_minimax_client):
llm = LlmFactory.create("minimax", {"model": "MiniMax-M2.7", "api_key": "test-key"})
assert isinstance(llm, MiniMaxLLM)
assert llm.config.model == "MiniMax-M2.7"


def test_factory_creates_minimax_llm_default_model(mock_minimax_client):
"""LlmFactory.create with no model returns MiniMaxLLM with MiniMax-M3 default."""
llm = LlmFactory.create("minimax", {"api_key": "test-key"})
assert isinstance(llm, MiniMaxLLM)
assert llm.config.model == "MiniMax-M3"