Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def is_valid(self, model_type: str, model_name, model_credential: Dict[str, obje
def encryption_dict(self, model: Dict[str, object]):
return {**model, 'api_key': super().encryption(model.get('api_key', ''))}

api_base = forms.TextInputField('API URL', required=True,
default_value='https://api.minimaxi.com/v1')
api_key = forms.PasswordInputField('API Key', required=True)
api_base = forms.TextInputField(_('API URL'), required=True,
default_value='https://api.minimax.io/v1')
api_key = forms.PasswordInputField(_('API Key'), required=True)

def get_model_params_setting_form(self, model_name):
return MiniMaxLLMModelParams()
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,34 @@
minimax_ttv_model_credential = TextToVideoModelCredential()
minimax_itv_model_credential = ImageToVideoModelCredential()

MINIMAX_ENDPOINTS = {
"global_en": {
"openai_base_url": "https://api.minimax.io/v1",
"anthropic_base_url": "https://api.minimax.io/anthropic/v1",
},
"cn_zh": {
"openai_base_url": "https://api.minimaxi.com/v1",
"anthropic_base_url": "https://api.minimaxi.com/anthropic/v1",
},
}

minimax_m2_7 = ModelInfo(
"MiniMax-M2.7",
_("Latest flagship model with enhanced reasoning and coding. 204K context window"),
_(
"Reasoning model with always-on thinking, 204,800-token context window, "
"$0.30/M input, $1.20/M output, $0.06/M cache read, and $0.375/M cache write"
),
ModelTypeConst.LLM,
minimax_llm_model_credential,
MiniMaxChatModel,
)

minimax_m3 = ModelInfo(
"MiniMax-M3",
_(""),
_(
"Adaptive-thinking multimodal model with text, image, and video inputs, "
"1,000,000-token context window, $0.60/M input, $2.40/M output, and $0.12/M cache read"
),
ModelTypeConst.LLM,
minimax_llm_model_credential,
MiniMaxChatModel,
Expand Down Expand Up @@ -100,7 +117,7 @@
.append_model_info(minimax_m2_7_highspeed)
.append_model_info(minimax_m2_5)
.append_model_info(minimax_m2_5_highspeed)
.append_default_model_info(minimax_m2_7)
.append_default_model_info(minimax_m3)
.append_model_info(minimax_tts_hd)
.append_model_info(minimax_tts_turbo)
.append_default_model_info(minimax_tts_hd)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def new_instance(model_type, model_name, model_credential: Dict[str, object], **
optional_params['extra_body'] = extra_body
return MiniMaxChatModel(
model=model_name,
openai_api_base=model_credential.get('api_base') or 'https://api.minimaxi.com/v1',
openai_api_base=model_credential.get('api_base') or 'https://api.minimax.io/v1',
openai_api_key=model_credential.get('api_key'),
**optional_params,
)
Loading