Skip to content

Commit 7d51f1c

Browse files
committed
fix: change highspeed model block to warning instead of ValueError
1 parent 0068960 commit 7d51f1c

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

astrbot/core/provider/sources/minimax_token_plan_source.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
import logging
2+
13
from astrbot.core.provider.sources.anthropic_source import ProviderAnthropic
24

35
from ..register import register_provider_adapter
46

7+
logger = logging.getLogger(__name__)
8+
59
MINIMAX_TOKEN_PLAN_MODELS = [
610
"MiniMax-M2.7",
711
"MiniMax-M2.5",
@@ -43,9 +47,11 @@ def __init__(
4347

4448
configured_model = provider_config.get("model", "MiniMax-M2.7")
4549
if configured_model not in MINIMAX_TOKEN_PLAN_MODELS:
46-
raise ValueError(
47-
f"Unsupported model: {configured_model!r}. "
48-
f"Supported models: {', '.join(MINIMAX_TOKEN_PLAN_MODELS)}"
50+
logger.warning(
51+
f"Configured model {configured_model!r} is not in the known Token Plan "
52+
f"model list ({', '.join(MINIMAX_TOKEN_PLAN_MODELS)}). "
53+
f"The model may still work if your plan supports it. "
54+
f"If you encounter errors, please check your plan's model availability."
4955
)
5056

5157
self.set_model(configured_model)

0 commit comments

Comments
 (0)