From fa83b99c560123cf8592894c0319cf26b98910da Mon Sep 17 00:00:00 2001 From: octo-patch Date: Tue, 2 Jun 2026 04:54:28 +0800 Subject: [PATCH] Upgrade default MiniMax model to M3 The MiniMax recaption provider now defaults to `MiniMax-M3`, the latest generation in the MiniMax family. The previous default `MiniMax-M2.7` (and `MiniMax-M2.7-highspeed`) remain selectable via the `OPENAI_COMPATIBLE_MODEL` environment variable for backward compatibility. Changes: - agent/llm_provider.py: default model `MiniMax-M2.7` -> `MiniMax-M3` - agent/config.py: docstring updated to reflect new default - README.md: Option 2 (MiniMax) now mentions M3 as default; M2.7 / M2.7-highspeed listed as previous-generation alternatives - tests: assertions and integration-test model strings updated to M3 Base URL (`https://api.minimax.io/v1`), API-key env var (`MINIMAX_API_KEY` / `OPENAI_COMPATIBLE_API_KEY`) and the temperature clamping behaviour are unchanged. The ROI detection step still uses Gemini directly and is unaffected. --- README.md | 2 +- agent/config.py | 2 +- agent/llm_provider.py | 6 +++--- tests/test_integration.py | 4 ++-- tests/test_llm_provider.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3c259f9..6373aa6 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,7 @@ export RECAPTION_PROVIDER="minimax" export MINIMAX_API_KEY="your-minimax-api-key" ``` -Uses the [MiniMax](https://www.minimax.io/) OpenAI-compatible API with the `MiniMax-M2.7` model by default. You can also use `MiniMax-M2.7-highspeed` for faster responses. +Uses the [MiniMax](https://www.minimax.io/) OpenAI-compatible API with the `MiniMax-M3` model by default. You can also use `MiniMax-M2.7` or `MiniMax-M2.7-highspeed` for the previous generation (set via `OPENAI_COMPATIBLE_MODEL`). **Option 3: Any OpenAI-compatible API** diff --git a/agent/config.py b/agent/config.py index af5ca64..67d8f9c 100644 --- a/agent/config.py +++ b/agent/config.py @@ -13,7 +13,7 @@ # --------------------------------------------------------------------------- # Supported values: "gemini" (default), "openai_compatible", "minimax" # When set to "minimax", uses the OpenAI-compatible provider with MiniMax -# defaults (base URL: https://api.minimax.io/v1, model: MiniMax-M2.7). +# defaults (base URL: https://api.minimax.io/v1, model: MiniMax-M3). RECAPTION_PROVIDER: str = os.environ.get("RECAPTION_PROVIDER", "gemini") # --------------------------------------------------------------------------- diff --git a/agent/llm_provider.py b/agent/llm_provider.py index 3af99fa..5245c4a 100644 --- a/agent/llm_provider.py +++ b/agent/llm_provider.py @@ -119,7 +119,7 @@ class OpenAICompatibleProvider(LLMProvider): - ``OPENAI_COMPATIBLE_API_KEY`` or ``MINIMAX_API_KEY``: API key. - ``OPENAI_COMPATIBLE_BASE_URL``: Base URL (default: MiniMax ``https://api.minimax.io/v1``). - - ``OPENAI_COMPATIBLE_MODEL``: Model name (default: ``MiniMax-M2.7``). + - ``OPENAI_COMPATIBLE_MODEL``: Model name (default: ``MiniMax-M3``). """ def __init__( @@ -141,7 +141,7 @@ def __init__( ) self._model = ( model - or os.environ.get("OPENAI_COMPATIBLE_MODEL", "MiniMax-M2.7") + or os.environ.get("OPENAI_COMPATIBLE_MODEL", "MiniMax-M3") ) def _get_client(self) -> Any: @@ -202,7 +202,7 @@ def get_recaption_provider() -> LLMProvider: When ``"minimax"`` is selected, the OpenAI-compatible provider is used with MiniMax defaults (``https://api.minimax.io/v1``, model - ``MiniMax-M2.7``). + ``MiniMax-M3``). """ provider_name = os.environ.get("RECAPTION_PROVIDER", "gemini").lower() provider_cls = _PROVIDERS.get(provider_name) diff --git a/tests/test_integration.py b/tests/test_integration.py index 714643f..fd37c00 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -41,7 +41,7 @@ def test_minimax_provider_generate(self): provider = OpenAICompatibleProvider( api_key=os.environ["MINIMAX_API_KEY"], base_url="https://api.minimax.io/v1", - model="MiniMax-M2.7", + model="MiniMax-M3", ) result = provider.generate( system_prompt="You are a helpful assistant.", @@ -79,7 +79,7 @@ def test_minimax_temperature_boundaries(self): provider = OpenAICompatibleProvider( api_key=os.environ["MINIMAX_API_KEY"], base_url="https://api.minimax.io/v1", - model="MiniMax-M2.7", + model="MiniMax-M3", ) # Should not raise with edge temperature values result = provider.generate( diff --git a/tests/test_llm_provider.py b/tests/test_llm_provider.py index 2f248f7..d1c66c5 100644 --- a/tests/test_llm_provider.py +++ b/tests/test_llm_provider.py @@ -160,7 +160,7 @@ def test_defaults_to_minimax(self): provider = OpenAICompatibleProvider() assert provider._api_key == "mm-key" assert "minimax" in provider._base_url.lower() - assert provider._model == "MiniMax-M2.7" + assert provider._model == "MiniMax-M3" def test_explicit_params(self): provider = OpenAICompatibleProvider(