From 5dc7f91f4da68858fcccde558b0337bda76dbed9 Mon Sep 17 00:00:00 2001 From: octo-patch Date: Tue, 2 Jun 2026 02:39:03 +0800 Subject: [PATCH] feat(openmemory-py/minimax): upgrade default model to MiniMax-M3 Upgrade the MiniMax adapter default chat model from MiniMax-M2.7 to the new MiniMax-M3 flagship. M2.7 and M2.7-highspeed remain available as explicit alternatives via the `model=` argument or `OM_MINIMAX_MODEL` env. - src/openmemory/ai/minimax.py: change fallback default to "MiniMax-M3" - tests/test_minimax.py: update default-model assertion and switch the custom / integration test models to MiniMax-M2.7-highspeed (the still-supported fast variant) - README.md: update the chat-model availability note for the minimax section --- packages/openmemory-py/README.md | 2 +- packages/openmemory-py/src/openmemory/ai/minimax.py | 2 +- packages/openmemory-py/tests/test_minimax.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) 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)