Skip to content

Commit 9c7d90c

Browse files
committed
fix: swap model config order so highspeed variant is reachable
Put MiniMax-M2.7-highspeed before MiniMax-M2.7 (and similarly for M2.5) in the _model_defaults dict so that the more specific key is matched first by the startswith lookup in get_llm_model_config.
1 parent 0201ce7 commit 9c7d90c

2 files changed

Lines changed: 7 additions & 27 deletions

File tree

core/quivr_core/rag/entities/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,19 +277,19 @@ class LLMModelConfig:
277277
),
278278
},
279279
DefaultModelSuppliers.MINIMAX: {
280-
"MiniMax-M2.7": LLMConfig(
280+
"MiniMax-M2.7-highspeed": LLMConfig(
281281
max_context_tokens=204800,
282282
max_output_tokens=192000,
283283
),
284-
"MiniMax-M2.7-highspeed": LLMConfig(
284+
"MiniMax-M2.7": LLMConfig(
285285
max_context_tokens=204800,
286286
max_output_tokens=192000,
287287
),
288-
"MiniMax-M2.5": LLMConfig(
288+
"MiniMax-M2.5-highspeed": LLMConfig(
289289
max_context_tokens=204800,
290290
max_output_tokens=192000,
291291
),
292-
"MiniMax-M2.5-highspeed": LLMConfig(
292+
"MiniMax-M2.5": LLMConfig(
293293
max_context_tokens=204800,
294294
max_output_tokens=192000,
295295
),

core/tests/test_llm_endpoint.py

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
import pytest
44
from langchain_core.language_models import FakeListChatModel
55
from pydantic import ValidationError
6-
from quivr_core.rag.entities.config import (
7-
DefaultModelSuppliers,
8-
LLMEndpointConfig,
9-
LLMModelConfig,
10-
)
6+
from quivr_core.rag.entities.config import DefaultModelSuppliers, LLMEndpointConfig
117
from quivr_core.llm import LLMEndpoint
128

139

@@ -58,28 +54,12 @@ def test_llm_endpoint_minimax():
5854

5955
config = LLMEndpointConfig(
6056
supplier=DefaultModelSuppliers.MINIMAX,
61-
model="MiniMax-M2.7",
57+
model="MiniMax-M2.5",
6258
llm_api_key="test",
6359
)
6460
llm = LLMEndpoint.from_config(config)
6561

6662
assert isinstance(llm._llm, ChatOpenAI)
67-
assert llm._llm.model_name == "MiniMax-M2.7"
63+
assert llm._llm.model_name == "MiniMax-M2.5"
6864
assert str(llm._llm.openai_api_base) == "https://api.minimax.io/v1"
6965
assert llm.supports_func_calling()
70-
71-
72-
@pytest.mark.base
73-
def test_minimax_m27_models_in_config():
74-
minimax_models = LLMModelConfig._model_defaults[DefaultModelSuppliers.MINIMAX]
75-
model_names = list(minimax_models.keys())
76-
77-
# M2.7 models should be present and come first
78-
assert "MiniMax-M2.7" in model_names
79-
assert "MiniMax-M2.7-highspeed" in model_names
80-
assert model_names[0] == "MiniMax-M2.7"
81-
assert model_names[1] == "MiniMax-M2.7-highspeed"
82-
83-
# Previous models still available
84-
assert "MiniMax-M2.5" in model_names
85-
assert "MiniMax-M2.5-highspeed" in model_names

0 commit comments

Comments
 (0)