From 9b86cb7a74c5a4e3d01e861de8f1ffa65f3da6ee Mon Sep 17 00:00:00 2001 From: fukukei23 Date: Tue, 28 Jul 2026 04:03:30 +0900 Subject: [PATCH] =?UTF-8?q?fix(llm):=20MiniMax=E3=83=A2=E3=83=87=E3=83=AB?= =?UTF-8?q?=E5=90=8D=E8=A1=A8=E8=A8=98=E3=82=92MiniMax-M3(PascalCase)?= =?UTF-8?q?=E3=81=AB=E7=B5=B1=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - llm_profiles.py: minimax_default/analytical のmodelをminimax-m3→MiniMax-M3 - test_generator.py: _call_minimaxデフォルトをMiniMax-M2.7(旧)→MiniMax-M3 - 上記テスト追従 + test_call_minimax_sends_correct_payload をMINIMAX_MODEL env明示セットで.env流入防御 - 実API(.env MINIMAX_MODEL=MiniMax-M3)と整合・小文字送信によるAPI弾きリスク解消 - 検証: LLM系681 passed / フル4905 passed・0 failed(従来1 failed→ゼロ化) Co-Authored-By: Claude --- ...45\244\211\346\233\264\345\261\245\346\255\264.md" | 11 +++++++++++ src/nexuscore/llm/llm_profiles.py | 4 ++-- src/nexuscore/utils/test_generator.py | 2 +- tests/llm/test_llm_profiles_comprehensive.py | 10 +++++----- tests/utils/test_test_generator_comprehensive.py | 4 ++-- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git "a/docs/\345\244\211\346\233\264\345\261\245\346\255\264.md" "b/docs/\345\244\211\346\233\264\345\261\245\346\255\264.md" index 998a1e99..f25af19c 100644 --- "a/docs/\345\244\211\346\233\264\345\261\245\346\255\264.md" +++ "b/docs/\345\244\211\346\233\264\345\261\245\346\255\264.md" @@ -5,6 +5,17 @@ NexusCore のプロジェクト固有変更履歴。 --- +## [2026-07-28] - MiniMaxモデル名表記の不統一是正(MiniMax-M3 PascalCase統一) + +### Fixed +- MiniMaxモデル名の表記揺れ(`minimax-m3`小文字 / `MiniMax-M3`PascalCase)を `MiniMax-M3` に統一。実API(`.env` の `MINIMAX_MODEL=MiniMax-M3`)と整合しない小文字表記が残存し、`_call_minimax` がenv未設定時に小文字を送ってAPIで弾かれるリスクがあった +- `src/nexuscore/llm/llm_profiles.py`: `minimax_default`/`minimax_analytical` の `model` を `minimax-m3`→`MiniMax-M3` に是正 +- `src/nexuscore/utils/test_generator.py`: `_call_minimax` のデフォルト(env未設定時フォールバック)を `MiniMax-M2.7`(旧モデル)→`MiniMax-M3` に更新 +- `tests/llm/test_llm_profiles_comprehensive.py`・`tests/utils/test_test_generator_comprehensive.py`: 上記に追従。`test_call_minimax_sends_correct_payload` は `MINIMAX_MODEL` env を明示セットして `.env` 流入を防ぐ堅牢化(従来はenv未隔离でフルスイート時のみ1件FAIL) +- 検証: LLM系 681 passed / フルスイート 4905 passed・0 failed(従来 4904 passed, 1 failed から失敗ゼロ化) + +--- + ## [2026-07-26] - 未完成エントリポイントの棚卸し(main_cli.py以外) ### Removed diff --git a/src/nexuscore/llm/llm_profiles.py b/src/nexuscore/llm/llm_profiles.py index a3d91251..9941246c 100644 --- a/src/nexuscore/llm/llm_profiles.py +++ b/src/nexuscore/llm/llm_profiles.py @@ -75,14 +75,14 @@ class LLMProfile: "minimax_default": LLMProfile( name="minimax_default", provider="minimax", - model="minimax-m3", + model="MiniMax-M3", description="MiniMax M3 for general chat and creative tasks", default_temperature=0.2, ), "minimax_analytical": LLMProfile( name="minimax_analytical", provider="minimax", - model="minimax-m3", + model="MiniMax-M3", description="MiniMax M3 for analytical and structured tasks", default_temperature=0.15, ), diff --git a/src/nexuscore/utils/test_generator.py b/src/nexuscore/utils/test_generator.py index 07fefcb6..8018ac59 100644 --- a/src/nexuscore/utils/test_generator.py +++ b/src/nexuscore/utils/test_generator.py @@ -77,7 +77,7 @@ def _call_minimax(messages: list[dict], temperature: float = 0.3) -> str: """Call MiniMax chat completions API via HTTP.""" api_key = os.getenv("MINIMAX_API_KEY") api_base = os.getenv("MINIMAX_API_BASE", "https://api.minimax.chat/v1") - model = os.getenv("MINIMAX_MODEL", "MiniMax-M2.7") + model = os.getenv("MINIMAX_MODEL", "MiniMax-M3") if not api_key: raise ValueError("MINIMAX_API_KEY environment variable is not set") response = requests.post( diff --git a/tests/llm/test_llm_profiles_comprehensive.py b/tests/llm/test_llm_profiles_comprehensive.py index 6e82384b..db5cea1d 100644 --- a/tests/llm/test_llm_profiles_comprehensive.py +++ b/tests/llm/test_llm_profiles_comprehensive.py @@ -36,14 +36,14 @@ def test_profile_creation_full(self): profile = LLMProfile( name="custom", provider="minimax", - model="minimax-m3", + model="MiniMax-M3", description="Test profile", default_temperature=0.5, ) assert profile.name == "custom" assert profile.provider == "minimax" - assert profile.model == "minimax-m3" + assert profile.model == "MiniMax-M3" assert profile.description == "Test profile" assert profile.default_temperature == 0.5 @@ -99,7 +99,7 @@ def test_registry_profile_structure_minimax_default(self): assert profile.name == "minimax_default" assert profile.provider == "minimax" - assert profile.model == "minimax-m3" + assert profile.model == "MiniMax-M3" assert profile.default_temperature == 0.2 def test_registry_all_profiles_have_required_fields(self): @@ -218,7 +218,7 @@ def test_profile_to_model_name_minimax_default(self): """minimax_defaultを正しく変換""" model_name = profile_to_model_name("minimax_default") - assert model_name == "minimax:minimax-m3" + assert model_name == "minimax:MiniMax-M3" def test_profile_to_model_name_gpt_codex(self): """gpt_codexを正しく変換""" @@ -228,7 +228,7 @@ def test_profile_to_model_name_gpt_codex(self): """minimax_analyticalを正しく変換""" model_name = profile_to_model_name("minimax_analytical") - assert model_name == "minimax:minimax-m3" + assert model_name == "minimax:MiniMax-M3" def test_profile_to_model_name_all_profiles(self): """全プロファイルが変換可能""" diff --git a/tests/utils/test_test_generator_comprehensive.py b/tests/utils/test_test_generator_comprehensive.py index bf758446..dc7d9598 100644 --- a/tests/utils/test_test_generator_comprehensive.py +++ b/tests/utils/test_test_generator_comprehensive.py @@ -152,11 +152,11 @@ def test_call_minimax_sends_correct_payload(self, mock_post): mock_response.raise_for_status = MagicMock() mock_post.return_value = mock_response - with patch.dict(os.environ, {"MINIMAX_API_KEY": "test-key"}): + with patch.dict(os.environ, {"MINIMAX_API_KEY": "test-key", "MINIMAX_MODEL": "MiniMax-M3"}): _call_minimax([{"role": "user", "content": "hello"}], temperature=0.5) call_kwargs = mock_post.call_args - assert call_kwargs[1]["json"]["model"] == "MiniMax-M2.7" + assert call_kwargs[1]["json"]["model"] == "MiniMax-M3" assert call_kwargs[1]["json"]["temperature"] == 0.5 @patch("nexuscore.utils.test_generator.requests.post")