diff --git a/packages/openmemory-py/README.md b/packages/openmemory-py/README.md index ea6b6161..3af7da31 100644 --- a/packages/openmemory-py/README.md +++ b/packages/openmemory-py/README.md @@ -180,7 +180,7 @@ embeddings={ } ``` -> uses MiniMax's `embo-01` model (1536 dimensions). for chat completions, MiniMax supports `MiniMax-M2.7` and `MiniMax-M2.5-highspeed` via OpenAI-compatible API. +> uses MiniMax's `embo-01` model (1536 dimensions). for chat completions, MiniMax supports `MiniMax-M3` (default), `MiniMax-M2.7`, and `MiniMax-M2.7-highspeed` via OpenAI-compatible API. #### aws bedrock ```python diff --git a/packages/openmemory-py/src/openmemory/ai/minimax.py b/packages/openmemory-py/src/openmemory/ai/minimax.py index a351b434..544ae2ad 100644 --- a/packages/openmemory-py/src/openmemory/ai/minimax.py +++ b/packages/openmemory-py/src/openmemory/ai/minimax.py @@ -19,7 +19,7 @@ def __init__(self, api_key: str = None, base_url: str = None): self.client = AsyncOpenAI(api_key=self.api_key, base_url=self.base_url) async def chat(self, messages: List[Dict[str, str]], model: str = None, **kwargs) -> str: - m = model or env.minimax_model or "MiniMax-M2.7" + m = model or env.minimax_model or "MiniMax-M3" temperature = kwargs.pop("temperature", None) if temperature is not None: temperature = max(0.0, min(float(temperature), 1.0)) diff --git a/packages/openmemory-py/tests/test_minimax.py b/packages/openmemory-py/tests/test_minimax.py index 2fbb66cd..66c6432c 100644 --- a/packages/openmemory-py/tests/test_minimax.py +++ b/packages/openmemory-py/tests/test_minimax.py @@ -71,7 +71,7 @@ async def test_chat_default_model(self): await adapter.chat([{"role": "user", "content": "test"}]) call_kwargs = adapter.client.chat.completions.create.call_args - assert call_kwargs.kwargs["model"] == "MiniMax-M2.7" + assert call_kwargs.kwargs["model"] == "MiniMax-M3" @pytest.mark.asyncio async def test_chat_custom_model(self): @@ -87,10 +87,10 @@ async def test_chat_custom_model(self): await adapter.chat( [{"role": "user", "content": "test"}], - model="MiniMax-M2.5-highspeed", + model="MiniMax-M2.7-highspeed", ) call_kwargs = adapter.client.chat.completions.create.call_args - assert call_kwargs.kwargs["model"] == "MiniMax-M2.5-highspeed" + assert call_kwargs.kwargs["model"] == "MiniMax-M2.7-highspeed" @pytest.mark.asyncio async def test_chat_temperature_clamping(self): @@ -408,7 +408,7 @@ async def test_chat_real_api(self): adapter = MiniMaxAdapter(api_key=api_key) result = await adapter.chat( [{"role": "user", "content": "Say 'hello' and nothing else."}], - model="MiniMax-M2.5-highspeed", + model="MiniMax-M2.7-highspeed", temperature=0.0, ) assert isinstance(result, str)