Skip to content

Fully autonomous AI Agents system capable of performing complex penetration testing tasks

feat(minimax): add MiniMax provider with full app/UI/installer parity (refs #328)

Sergey Kozyrenko55335feb17f0
diff --git a/backend/cmd/ctester/main.go b/backend/cmd/ctester/main.go
index 85f48253..eb5ad29a 100644
--- a/backend/cmd/ctester/main.go
+++ b/backend/cmd/ctester/main.go
@@ -17,6 +17,7 @@ import (
"pentagi/pkg/providers/gemini"
"pentagi/pkg/providers/glm"
"pentagi/pkg/providers/kimi"
+ "pentagi/pkg/providers/minimax"
"pentagi/pkg/providers/ollama"
"pentagi/pkg/providers/openai"
"pentagi/pkg/providers/pconfig"
@@ -32,7 +33,7 @@ import (
func main() {
envFile := flag.String("env", ".env", "Path to environment file")
- providerType := flag.String("type", "custom", "Provider type [custom, openai, anthropic, gemini, bedrock, ollama, deepseek, glm, kimi, qwen]")
+ providerType := flag.String("type", "custom", "Provider type [custom, openai, anthropic, gemini, bedrock, ollama, deepseek, glm, kimi, qwen, minimax]")
providerName := flag.String("name", "", "Provider name using as PROVDER_NAME/MODEL_NAME while building provider config")
configPath := flag.String("config", "", "Path to provider config file")
testsPath := flag.String("tests", "", "Path to custom tests YAML file")
@@ -224,6 +225,16 @@ func createProvider(providerType string, cfg *config.Config) (provider.Provider,
}
return qwen.New(cfg, provider.DefaultProviderNameQwen, providerConfig)
+ case "minimax":
+ if cfg.MiniMaxAPIKey == "" {
+ return nil, fmt.Errorf("MiniMax API key is not set")
+ }
+ providerConfig, err := minimax.DefaultProviderConfig()
+ if err != nil {
+ return nil, fmt.Errorf("error creating minimax provider config: %w", err)
+ }
+ return minimax.New(cfg, provider.DefaultProviderNameMiniMax, providerConfig)
+
default:
return nil, fmt.Errorf("unsupported provider type: %s", providerType)
}
diff --git a/backend/cmd/ftester/main.go b/backend/cmd/ftester/main.go
index db20e5e7..8d72197b 100644
--- a/backend/cmd/ftester/main.go
+++ b/backend/cmd/ftester/main.go
@@ -29,7 +29,7 @@ import (
func main() {
envFile := flag.String("env", ".env", "Path to environment file")
- providerName := flag.String("provider", "custom", "Provider name (openai, anthropic, gemini, bedrock, ollama, deepseek, glm, kimi, qwen, custom)")
+ providerName := flag.String("provider", "custom", "Provider name (openai, anthropic, gemini, bedrock, ollama, deepseek, glm, kimi, qwen, minimax, custom)")
flowID := flag.Int64("flow", 0, "Flow ID for testing functions that require it (0 means using mocks)")
userID := flag.Int64("user", 0, "User ID for testing functions that require it (1 is default admin user)")
taskID := flag.Int64("task", 0, "Task ID for testing functions with default unset")
diff --git a/backend/cmd/installer/wizard/controller/controller.go b/backend/cmd/installer/wizard/controller/controller.go
index fe98d179..a35cb787 100644
--- a/backend/cmd/installer/wizard/controller/controller.go
+++ b/backend/cmd/installer/wizard/controller/controller.go
@@ -148,8 +148,8 @@ type LLMProviderConfig struct {
// direct form field mappings using loader.EnvVar
// these fields directly correspond to environment variables and form inputs (not computed)
- BaseURL loader.EnvVar // OPEN_AI_SERVER_URL | ANTHROPIC_SERVER_URL | GEMINI_SERVER_URL | BEDROCK_SERVER_URL | OLLAMA_SERVER_URL | DEEPSEEK_SERVER_URL | GLM_SERVER_URL | KIMI_SERVER_URL | QWEN_SERVER_URL | LLM_SERVER_URL
- APIKey loader.EnvVar // OPEN_AI_KEY | ANTHROPIC_API_KEY | GEMINI_API_KEY | LLM_SERVER_KEY | DEEPSEEK_API_KEY | GLM_API_KEY | KIMI_API_KEY | QWEN_API_KEY | OLLAMA_SERVER_API_KEY
+ BaseURL loader.EnvVar // OPEN_AI_SERVER_URL | ANTHROPIC_SERVER_URL | GEMINI_SERVER_URL | BEDROCK_SERVER_URL | OLLAMA_SERVER_URL | DEEPSEEK_SERVER_URL | GLM_SERVER_URL | KIMI_SERVER_URL | QWEN_SERVER_URL | MINIMAX_SERVER_URL | LLM_SERVER_URL
+ APIKey loader.EnvVar // OPEN_AI_KEY | ANTHROPIC_API_KEY | GEMINI_API_KEY | LLM_SERVER_KEY | DEEPSEEK_API_KEY | GLM_API_KEY | KIMI_API_KEY | QWEN_API_KEY | MINIMAX_API_KEY | OLLAMA_SERVER_API_KEY
Model loader.EnvVar // LLM_SERVER_MODEL
// AWS Bedrock specific fields
DefaultAuth loader.EnvVar // BEDROCK_DEFAULT_AUTH
@@ -164,7 +164,7 @@ type LLMProviderConfig struct {
LegacyReasoning loader.EnvVar // LLM_SERVER_LEGACY_REASONING
PreserveReasoning loader.EnvVar // LLM_SERVER_PRESERVE_REASONING
// Custom specific fields
- ProviderName loader.EnvVar // LLM_SERVER_PROVIDER | DEEPSEEK_PROVIDER | GLM_PROVIDER | KIMI_PROVIDER | QWEN_PROVIDER
+ ProviderName loader.EnvVar // LLM_SERVER_PROVIDER | DEEPSEEK_PROVIDER | GLM_PROVIDER | KIMI_PROVIDER | QWEN_PROVIDER | MINIMAX_PROVIDER
// Ollama specific fields
PullTimeout loader.EnvVar // OLLAMA_SERVER_PULL_MODELS_TIMEOUT
PullEnabled loader.EnvVar // OLLAMA_SERVER_PULL_MODELS_ENABLED
@@ -202,6 +202,7 @@ func (c *controller) GetLLMProviders() map[string]*LLMProviderConfig {
"glm": c.GetLLMProviderConfig("glm"),
"kimi": c.GetLLMProviderConfig("kimi"),
"qwen": c.GetLLMProviderConfig("qwen"),
+ "minimax": c.GetLLMProviderConfig("minimax"),
"custom": c.GetLLMProviderConfig("custom"),
}
}
@@ -290,6 +291,13 @@ func (c *controller) GetLLMProviderConfig(providerID string) *LLMProviderConfig
providerConfig.ProviderName, _ = c.GetVar("QWEN_PROVIDER")
providerConfig.Configured = providerConfig.APIKey.Value != ""
+ case "minimax":
+ providerConfig.Name = "MiniMax"
+ providerConfig.APIKey, _ = c.GetVar("MINIMAX_API_KEY")
+ providerConfig.BaseURL, _ = c.GetVar("MINIMAX_SERVER_URL")
+ providerConfig.ProviderName, _ = c.GetVar("MINIMAX_PROVIDER")
+ providerConfig.Configured = providerConfig.APIKey.Value != ""
+
case "custom":
providerConfig.Name = "Custom"
providerConfig.BaseURL, _ = c.GetVar("LLM_SERVER_URL")
@@ -442,6 +450,17 @@ func (c *controller) UpdateLLMProviderConfig(providerID string, config *LLMProvi
return fmt.Errorf("failed to set %s: %w", config.ProviderName.Name, err)
}
+ case "minimax":
+ if err := c.SetVar(config.APIKey.Name, config.APIKey.Value); err != nil {
+ return fmt.Errorf("failed to set %s: %w", config.APIKey.Name, err)
+ }
+ if err := c.SetVar(config.BaseURL.Name, config.BaseURL.Value); err != nil {
+ return fmt.Errorf("failed to set %s: %w", config.BaseURL.Name, err)
+ }
+ if err := c.SetVar(config.ProviderName.Name, config.ProviderName.Value); err != nil {
+ return fmt.Errorf("failed to set %s: %w", config.ProviderName.Name, err)
+ }
+
case "custom":
if err := c.SetVar(config.BaseURL.Name, config.BaseURL.Value); err != nil {
return fmt.Errorf("failed to set %s: %w", config.BaseURL.Name, err)
@@ -519,6 +538,8 @@ func (c *controller) ResetLLMProviderConfig(providerID string) map[string]*LLMPr
vars = []string{"KIMI_API_KEY", "KIMI_SERVER_URL", "KIMI_PROVIDER"}
case "qwen":
vars = []string{"QWEN_API_KEY", "QWEN_SERVER_URL", "QWEN_PROVIDER"}
+ case "minimax":
+ vars = []string{"MINIMAX_API_KEY", "MINIMAX_SERVER_URL", "MINIMAX_PROVIDER"}
case "custom":
vars = []string{
"LLM_SERVER_URL", "LLM_SERVER_KEY", "LLM_SERVER_MODEL",
@@ -2166,6 +2187,9 @@ func (c *controller) getVariableDescription(varName string) string {
"QWEN_API_KEY": locale.EnvDesc_QWEN_API_KEY,
"QWEN_SERVER_URL": locale.EnvDesc_QWEN_SERVER_URL,
"QWEN_PROVIDER": locale.EnvDesc_QWEN_PROVIDER,
+ "MINIMAX_API_KEY": locale.EnvDesc_MINIMAX_API_KEY,
+ "MINIMAX_SERVER_URL": locale.EnvDesc_MINIMAX_SERVER_URL,
+ "MINIMAX_PROVIDER": locale.EnvDesc_MINIMAX_PROVIDER,
"LLM_SERVER_URL": locale.EnvDesc_LLM_SERVER_URL,
"LLM_SERVER_KEY": locale.EnvDesc_LLM_SERVER_KEY,
"LLM_SERVER_MODEL": locale.EnvDesc_LLM_SERVER_MODEL,
@@ -2335,6 +2359,7 @@ var maskedVariables = map[string]bool{
"GLM_API_KEY": true,
"KIMI_API_KEY": true,
"QWEN_API_KEY": true,
+ "MINIMAX_API_KEY": true,
"LLM_SERVER_KEY": true,
"LANGFUSE_PUBLIC_KEY": true,
"LANGFUSE_SECRET_KEY": true,
@@ -2422,6 +2447,9 @@ var criticalVariables = map[string]bool{
"QWEN_API_KEY": true,
"QWEN_SERVER_URL": true,
"QWEN_PROVIDER": true,
+ "MINIMAX_API_KEY": true,
+ "MINIMAX_SERVER_URL": true,
+ "MINIMAX_PROVIDER": true,
"LLM_SERVER_URL": true,
"LLM_SERVER_KEY": true,
"LLM_SERVER_MODEL": true,
diff --git a/backend/cmd/installer/wizard/locale/locale.go b/backend/cmd/installer/wizard/locale/locale.go
index b42833c9..6b0321ce 100644
--- a/backend/cmd/installer/wizard/locale/locale.go
+++ b/backend/cmd/installer/wizard/locale/locale.go
@@ -366,6 +366,7 @@ const (
LLMProviderGLM = "GLM Zhipu AI"
LLMProviderKimi = "Kimi Moonshot AI"
LLMProviderQwen = "Qwen Alibaba Cloud"
+ LLMProviderMiniMax = "MiniMax"
LLMProviderCustom = "Custom"
LLMProviderOpenAIDesc = "Industry-leading GPT models with excellent general performance"
LLMProviderAnthropicDesc = "Claude models with superior reasoning and safety features"
@@ -376,6 +377,7 @@ const (
LLMProviderGLMDesc = "Zhipu AI's GLM models for Chinese and English tasks"
LLMProviderKimiDesc = "Moonshot AI's long-context models for document analysis"
LLMProviderQwenDesc = "Alibaba Cloud's Qwen models for multilingual tasks"
+ LLMProviderMiniMaxDesc = "MiniMax's M-series models for agentic reasoning and long-context tasks"
LLMProviderCustomDesc = "Custom OpenAI-compatible endpoint for maximum flexibility"
)
@@ -600,6 +602,31 @@ Cost: Competitive pricing with flexible tiers for different use cases
Setup: Get your API key from https://dashscope.console.aliyun.com/`
+ LLMFormMiniMaxHelp = `MiniMax provides the M-series of agentic models with very large context windows, accessible through an OpenAI-compatible API.
+
+Default PentAGI Models:
+• MiniMax-M3: Latest flagship model (~1M token context) for agentic reasoning, tool use, coding, and long-context tasks
+• MiniMax-M2.7: Previous-generation model with strong reasoning and coding capabilities
+• MiniMax-M2.7-highspeed: Low-latency variant of M2.7 for fast response scenarios
+
+Key Advantages:
+• Very large context window on M3 (~1M tokens) for long codebases and reports
+• Strong agentic tool-calling, JSON output, and streaming support
+• OpenAI- and Anthropic-compatible endpoints for drop-in integration
+
+API Endpoint:
+• Global: https://api.minimax.io/v1 (default)
+
+LiteLLM Integration:
+• Set Provider Name to 'minimax' when using a LiteLLM proxy
+• Enables model prefix (e.g., minimax/MiniMax-M3) without modifying config.yml
+• Optional for direct MiniMax API usage
+
+Best for: Agentic security workflows that benefit from very large context and reliable tool calling
+Cost: Competitive per-token pricing across the M-series
+
+Setup: Get your API key from https://platform.minimax.io/`
+
LLMFormCustomHelp = `Configure any OpenAI-compatible API endpoint for maximum flexibility and integration with existing infrastructure.
Ready-to-use Configurations:
@@ -2190,6 +2217,9 @@ const (
EnvDesc_QWEN_API_KEY = "Qwen API Key"
EnvDesc_QWEN_SERVER_URL = "Qwen Server URL"
EnvDesc_QWEN_PROVIDER = "Qwen Provider Name Prefix (for LiteLLM, e.g., 'dashscope')"
+ EnvDesc_MINIMAX_API_KEY = "MiniMax API Key"
+ EnvDesc_MINIMAX_SERVER_URL = "MiniMax Server URL"
+ EnvDesc_MINIMAX_PROVIDER = "MiniMax Provider Name Prefix (for LiteLLM, e.g., 'minimax')"
EnvDesc_LLM_SERVER_URL = "Custom LLM Server URL"
EnvDesc_LLM_SERVER_KEY = "Custom LLM API Key"
EnvDesc_LLM_SERVER_MODEL = "Custom LLM Model"
diff --git a/backend/cmd/installer/wizard/models/llm_provider_form.go b/backend/cmd/installer/wizard/models/llm_provider_form.go
index 0c4c90ad..c589cd30 100644
--- a/backend/cmd/installer/wizard/models/llm_provider_form.go
+++ b/backend/cmd/installer/wizard/models/llm_provider_form.go
@@ -69,7 +69,7 @@ func (m *LLMProviderFormModel) BuildForm() tea.Cmd {
fields = append(fields, m.createPullEnabledField(config))
fields = append(fields, m.createLoadModelsEnabledField(config))
- case LLMProviderDeepSeek, LLMProviderGLM, LLMProviderKimi, LLMProviderQwen:
+ case LLMProviderDeepSeek, LLMProviderGLM, LLMProviderKimi, LLMProviderQwen, LLMProviderMiniMax:
fields = append(fields, m.createBaseURLField(config))
fields = append(fields, m.createAPIKeyField(config))
fields = append(fields, m.createProviderNameField(config))
@@ -365,6 +365,8 @@ func (m *LLMProviderFormModel) GetFormDescription() string {
return locale.LLMProviderKimiDesc
case LLMProviderQwen:
return locale.LLMProviderQwenDesc
+ case LLMProviderMiniMax:
+ return locale.LLMProviderMiniMaxDesc
case LLMProviderCustom:
return locale.LLMProviderCustomDesc
default:
@@ -392,6 +394,8 @@ func (m *LLMProviderFormModel) GetFormName() string {
return locale.LLMProviderKimi
case LLMProviderQwen:
return locale.LLMProviderQwen
+ case LLMProviderMiniMax:
+ return locale.LLMProviderMiniMax
case LLMProviderCustom:
return locale.LLMProviderCustom
default:
@@ -510,7 +514,7 @@ func (m *LLMProviderFormModel) GetCurrentConfiguration() string {
locale.LLMFormFieldLoadModelsEnabled, m.GetStyles().Info.Render(config.LoadModelsEnabled.Value)))
}
- case LLMProviderDeepSeek, LLMProviderGLM, LLMProviderKimi, LLMProviderQwen:
+ case LLMProviderDeepSeek, LLMProviderGLM, LLMProviderKimi, LLMProviderQwen, LLMProviderMiniMax:
if config.BaseURL.Value != "" {
sections = append(sections, fmt.Sprintf("• %s: %s",
locale.LLMFormFieldBaseURL, m.GetStyles().Info.Render(locale.StatusConfigured)))
@@ -587,6 +591,8 @@ func (m *LLMProviderFormModel) GetHelpContent() string {
sections = append(sections, locale.LLMFormKimiHelp)
case LLMProviderQwen:
sections = append(sections, locale.LLMFormQwenHelp)
+ case LLMProviderMiniMax:
+ sections = append(sections, locale.LLMFormMiniMaxHelp)
case LLMProviderCustom:
sections = append(sections, locale.LLMFormCustomHelp)
}
@@ -784,6 +790,8 @@ func (m *LLMProviderFormModel) getDefaultBaseURL() string {
return "https://api.moonshot.ai/v1"
case LLMProviderQwen:
return "https://dashscope-us.aliyuncs.com/compatible-mode/v1"
+ case LLMProviderMiniMax:
+ return "https://api.minimax.io/v1"
case LLMProviderCustom:
return "http://llm-server:8000"
default:
diff --git a/backend/cmd/installer/wizard/models/llm_providers.go b/backend/cmd/installer/wizard/models/llm_providers.go
index 5ea54769..a4c504c3 100644
--- a/backend/cmd/installer/wizard/models/llm_providers.go
+++ b/backend/cmd/installer/wizard/models/llm_providers.go
@@ -40,6 +40,7 @@ func (h *LLMProvidersHandler) LoadItems() []ListItem {
{ID: LLMProviderGLMScreen},
{ID: LLMProviderKimiScreen},
{ID: LLMProviderQwenScreen},
+ {ID: LLMProviderMiniMaxScreen},
{ID: LLMProviderCustomScreen},
}
diff --git a/backend/cmd/installer/wizard/models/types.go b/backend/cmd/installer/wizard/models/types.go
index 1f2d5a6a..568f091f 100644
--- a/backend/cmd/installer/wizard/models/types.go
+++ b/backend/cmd/installer/wizard/models/types.go
@@ -92,6 +92,7 @@ const (
LLMProviderGLMScreen ScreenID = "llm_provider_form§glm"
LLMProviderKimiScreen ScreenID = "llm_provider_form§kimi"
LLMProviderQwenScreen ScreenID = "llm_provider_form§qwen"
+ LLMProviderMiniMaxScreen ScreenID = "llm_provider_form§minimax"
// Summarizer screens
SummarizerScreen ScreenID = "summarizer"
@@ -143,6 +144,7 @@ const (
LLMProviderGLM LLMProviderID = "glm"
LLMProviderKimi LLMProviderID = "kimi"
LLMProviderQwen LLMProviderID = "qwen"
+ LLMProviderMiniMax LLMProviderID = "minimax"
)
// NavigationMsg represents screen navigation requests
diff --git a/backend/cmd/installer/wizard/registry/registry.go b/backend/cmd/installer/wizard/registry/registry.go
index dde9cd0d..bcfee91a 100644
--- a/backend/cmd/installer/wizard/registry/registry.go
+++ b/backend/cmd/installer/wizard/registry/registry.go
@@ -59,6 +59,7 @@ func (r *registry) initScreens() {
r.screens[models.LLMProviderGLMScreen] = models.NewLLMProviderFormModel(r.controller, r.styles, r.window, models.LLMProviderGLM)
r.screens[models.LLMProviderKimiScreen] = models.NewLLMProviderFormModel(r.controller, r.styles, r.window, models.LLMProviderKimi)
r.screens[models.LLMProviderQwenScreen] = models.NewLLMProviderFormModel(r.controller, r.styles, r.window, models.LLMProviderQwen)
+ r.screens[models.LLMProviderMiniMaxScreen] = models.NewLLMProviderFormModel(r.controller, r.styles, r.window, models.LLMProviderMiniMax)
r.screens[models.LLMProviderOllamaScreen] = models.NewLLMProviderFormModel(r.controller, r.styles, r.window, models.LLMProviderOllama)
r.screens[models.LLMProviderCustomScreen] = models.NewLLMProviderFormModel(r.controller, r.styles, r.window, models.LLMProviderCustom)
diff --git a/backend/migrations/sql/20260621_120000_add_minimax_provider.sql b/backend/migrations/sql/20260621_120000_add_minimax_provider.sql
new file mode 100644
index 00000000..6d9da59c
--- /dev/null
+++ b/backend/migrations/sql/20260621_120000_add_minimax_provider.sql
@@ -0,0 +1,87 @@
+-- +goose Up
+-- +goose StatementBegin
+-- Add the MiniMax provider to the provider_type enum
+CREATE TYPE PROVIDER_TYPE_NEW AS ENUM (
+ 'openai',
+ 'anthropic',
+ 'gemini',
+ 'bedrock',
+ 'ollama',
+ 'custom',
+ 'deepseek',
+ 'glm',
+ 'kimi',
+ 'qwen',
+ 'minimax'
+);
+
+-- Update columns to use the new enum type
+ALTER TABLE providers
+ ALTER COLUMN type TYPE PROVIDER_TYPE_NEW USING type::text::PROVIDER_TYPE_NEW;
+
+ALTER TABLE flows
+ ALTER COLUMN model_provider_type TYPE PROVIDER_TYPE_NEW USING model_provider_type::text::PROVIDER_TYPE_NEW;
+
+ALTER TABLE assistants
+ ALTER COLUMN model_provider_type TYPE PROVIDER_TYPE_NEW USING model_provider_type::text::PROVIDER_TYPE_NEW;
+
+-- Drop the old type and rename the new one
+DROP TYPE PROVIDER_TYPE;
+ALTER TYPE PROVIDER_TYPE_NEW RENAME TO PROVIDER_TYPE;
+
+-- Ensure NOT NULL constraints are preserved
+ALTER TABLE providers
+ ALTER COLUMN type SET NOT NULL;
+
+ALTER TABLE flows
+ ALTER COLUMN model_provider_type SET NOT NULL;
+
+ALTER TABLE assistants
+ ALTER COLUMN model_provider_type SET NOT NULL;
+-- +goose StatementEnd
+
+-- +goose Down
+-- +goose StatementBegin
+-- Delete providers using the MiniMax type before reverting the enum
+DELETE FROM providers WHERE type IN ('minimax');
+DELETE FROM flows WHERE model_provider_type IN ('minimax');
+DELETE FROM assistants WHERE model_provider_type IN ('minimax');
+
+-- Create new enum type without the MiniMax provider
+CREATE TYPE PROVIDER_TYPE_NEW AS ENUM (
+ 'openai',
+ 'anthropic',
+ 'gemini',
+ 'bedrock',
+ 'ollama',
+ 'custom',
+ 'deepseek',
+ 'glm',
+ 'kimi',
+ 'qwen'
+);
+
+-- Update columns to use the new enum type
+ALTER TABLE providers
+ ALTER COLUMN type TYPE PROVIDER_TYPE_NEW USING type::text::PROVIDER_TYPE_NEW;
+
+ALTER TABLE flows
+ ALTER COLUMN model_provider_type TYPE PROVIDER_TYPE_NEW USING model_provider_type::text::PROVIDER_TYPE_NEW;
+
+ALTER TABLE assistants
+ ALTER COLUMN model_provider_type TYPE PROVIDER_TYPE_NEW USING model_provider_type::text::PROVIDER_TYPE_NEW;
+
+-- Drop the old type and rename the new one
+DROP TYPE PROVIDER_TYPE;
+ALTER TYPE PROVIDER_TYPE_NEW RENAME TO PROVIDER_TYPE;
+
+-- Ensure NOT NULL constraints are preserved
+ALTER TABLE providers
+ ALTER COLUMN type SET NOT NULL;
+
+ALTER TABLE flows
+ ALTER COLUMN model_provider_type SET NOT NULL;
+
+ALTER TABLE assistants
+ ALTER COLUMN model_provider_type SET NOT NULL;
+-- +goose StatementEnd
diff --git a/backend/pkg/config/config.go b/backend/pkg/config/config.go
index f1d890d2..0d433972 100644
--- a/backend/pkg/config/config.go
+++ b/backend/pkg/config/config.go
@@ -140,6 +140,11 @@ type Config struct {
QwenServerURL string `env:"QWEN_SERVER_URL" envDefault:"https://dashscope-us.aliyuncs.com/compatible-mode/v1"`
QwenProvider string `env:"QWEN_PROVIDER"`
+ // === LLM Provider: MiniMax ===
+ MiniMaxAPIKey string `env:"MINIMAX_API_KEY"`
+ MiniMaxServerURL string `env:"MINIMAX_SERVER_URL" envDefault:"https://api.minimax.io/v1"`
+ MiniMaxProvider string `env:"MINIMAX_PROVIDER"`
+
// === Search Engine: DuckDuckGo ===
DuckDuckGoEnabled bool `env:"DUCKDUCKGO_ENABLED" envDefault:"true"`
DuckDuckGoRegion string `env:"DUCKDUCKGO_REGION"`
@@ -327,6 +332,7 @@ func (c *Config) GetSecretPatterns() []patterns.Pattern {
{c.GLMAPIKey, "GLM Key"},
{c.KimiAPIKey, "Kimi Key"},
{c.QwenAPIKey, "Qwen Key"},
+ {c.MiniMaxAPIKey, "MiniMax Key"},
{c.GoogleAPIKey, "Google API Key"},
{c.GoogleCXKey, "Google CX Key"},
{c.OAuthGoogleClientID, "Google Client ID"},
diff --git a/backend/pkg/database/models.go b/backend/pkg/database/models.go
index 87440446..18ad4279 100644
--- a/backend/pkg/database/models.go
+++ b/backend/pkg/database/models.go
@@ -432,6 +432,7 @@ const (
ProviderTypeGlm ProviderType = "glm"
ProviderTypeKimi ProviderType = "kimi"
ProviderTypeQwen ProviderType = "qwen"
+ ProviderTypeMinimax ProviderType = "minimax"
)
func (e *ProviderType) Scan(src interface{}) error {
diff --git a/backend/pkg/graph/generated.go b/backend/pkg/graph/generated.go
index 3e07ad1f..1ee82c35 100644
--- a/backend/pkg/graph/generated.go
+++ b/backend/pkg/graph/generated.go
@@ -212,6 +212,7 @@ type ComplexityRoot struct {
Gemini func(childComplexity int) int
Glm func(childComplexity int) int
Kimi func(childComplexity int) int
+ Minimax func(childComplexity int) int
Ollama func(childComplexity int) int
Openai func(childComplexity int) int
Qwen func(childComplexity int) int
@@ -448,6 +449,7 @@ type ComplexityRoot struct {
Gemini func(childComplexity int) int
Glm func(childComplexity int) int
Kimi func(childComplexity int) int
+ Minimax func(childComplexity int) int
Ollama func(childComplexity int) int
Openai func(childComplexity int) int
Qwen func(childComplexity int) int
@@ -461,6 +463,7 @@ type ComplexityRoot struct {
Gemini func(childComplexity int) int
Glm func(childComplexity int) int
Kimi func(childComplexity int) int
+ Minimax func(childComplexity int) int
Ollama func(childComplexity int) int
Openai func(childComplexity int) int
Qwen func(childComplexity int) int
@@ -1651,6 +1654,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.DefaultProvidersConfig.Kimi(childComplexity), true
+ case "DefaultProvidersConfig.minimax":
+ if e.complexity.DefaultProvidersConfig.Minimax == nil {
+ break
+ }
+
+ return e.complexity.DefaultProvidersConfig.Minimax(childComplexity), true
+
case "DefaultProvidersConfig.ollama":
if e.complexity.DefaultProvidersConfig.Ollama == nil {
break
@@ -2938,6 +2948,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.ProvidersModelsList.Kimi(childComplexity), true
+ case "ProvidersModelsList.minimax":
+ if e.complexity.ProvidersModelsList.Minimax == nil {
+ break
+ }
+
+ return e.complexity.ProvidersModelsList.Minimax(childComplexity), true
+
case "ProvidersModelsList.ollama":
if e.complexity.ProvidersModelsList.Ollama == nil {
break
@@ -3008,6 +3025,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.ProvidersReadinessStatus.Kimi(childComplexity), true
+ case "ProvidersReadinessStatus.minimax":
+ if e.complexity.ProvidersReadinessStatus.Minimax == nil {
+ break
+ }
+
+ return e.complexity.ProvidersReadinessStatus.Minimax(childComplexity), true
+
case "ProvidersReadinessStatus.ollama":
if e.complexity.ProvidersReadinessStatus.Ollama == nil {
break
@@ -14105,6 +14129,61 @@ func (ec *executionContext) fieldContext_DefaultProvidersConfig_qwen(_ context.C
return fc, nil
}
+func (ec *executionContext) _DefaultProvidersConfig_minimax(ctx context.Context, field graphql.CollectedField, obj *model.DefaultProvidersConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_DefaultProvidersConfig_minimax(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Minimax, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.ProviderConfig)
+ fc.Result = res
+ return ec.marshalOProviderConfig2ᚖpentagiᚋpkgᚋgraphᚋmodelᚐProviderConfig(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_DefaultProvidersConfig_minimax(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "DefaultProvidersConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_ProviderConfig_id(ctx, field)
+ case "name":
+ return ec.fieldContext_ProviderConfig_name(ctx, field)
+ case "type":
+ return ec.fieldContext_ProviderConfig_type(ctx, field)
+ case "agents":
+ return ec.fieldContext_ProviderConfig_agents(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_ProviderConfig_createdAt(ctx, field)
+ case "updatedAt":
+ return ec.fieldContext_ProviderConfig_updatedAt(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProviderConfig", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Flow_id(ctx context.Context, field graphql.CollectedField, obj *model.Flow) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Flow_id(ctx, field)
if err != nil {
@@ -21471,6 +21550,8 @@ func (ec *executionContext) fieldContext_ProvidersConfig_enabled(_ context.Conte
return ec.fieldContext_ProvidersReadinessStatus_kimi(ctx, field)
case "qwen":
return ec.fieldContext_ProvidersReadinessStatus_qwen(ctx, field)
+ case "minimax":
+ return ec.fieldContext_ProvidersReadinessStatus_minimax(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ProvidersReadinessStatus", field.Name)
},
@@ -21537,6 +21618,8 @@ func (ec *executionContext) fieldContext_ProvidersConfig_default(_ context.Conte
return ec.fieldContext_DefaultProvidersConfig_kimi(ctx, field)
case "qwen":
return ec.fieldContext_DefaultProvidersConfig_qwen(ctx, field)
+ case "minimax":
+ return ec.fieldContext_DefaultProvidersConfig_minimax(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type DefaultProvidersConfig", field.Name)
},
@@ -21658,6 +21741,8 @@ func (ec *executionContext) fieldContext_ProvidersConfig_models(_ context.Contex
return ec.fieldContext_ProvidersModelsList_kimi(ctx, field)
case "qwen":
return ec.fieldContext_ProvidersModelsList_qwen(ctx, field)
+ case "minimax":
+ return ec.fieldContext_ProvidersModelsList_minimax(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ProvidersModelsList", field.Name)
},
@@ -22224,6 +22309,61 @@ func (ec *executionContext) fieldContext_ProvidersModelsList_qwen(_ context.Cont
return fc, nil
}
+func (ec *executionContext) _ProvidersModelsList_minimax(ctx context.Context, field graphql.CollectedField, obj *model.ProvidersModelsList) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProvidersModelsList_minimax(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Minimax, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*model.ModelConfig)
+ fc.Result = res
+ return ec.marshalOModelConfig2ᚕᚖpentagiᚋpkgᚋgraphᚋmodelᚐModelConfigᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_ProvidersModelsList_minimax(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProvidersModelsList",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_ModelConfig_name(ctx, field)
+ case "description":
+ return ec.fieldContext_ModelConfig_description(ctx, field)
+ case "releaseDate":
+ return ec.fieldContext_ModelConfig_releaseDate(ctx, field)
+ case "thinking":
+ return ec.fieldContext_ModelConfig_thinking(ctx, field)
+ case "reasoning":
+ return ec.fieldContext_ModelConfig_reasoning(ctx, field)
+ case "price":
+ return ec.fieldContext_ModelConfig_price(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ModelConfig", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _ProvidersReadinessStatus_openai(ctx context.Context, field graphql.CollectedField, obj *model.ProvidersReadinessStatus) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ProvidersReadinessStatus_openai(ctx, field)
if err != nil {
@@ -22664,6 +22804,50 @@ func (ec *executionContext) fieldContext_ProvidersReadinessStatus_qwen(_ context
return fc, nil
}
+func (ec *executionContext) _ProvidersReadinessStatus_minimax(ctx context.Context, field graphql.CollectedField, obj *model.ProvidersReadinessStatus) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProvidersReadinessStatus_minimax(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Minimax, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ fc.Result = res
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_ProvidersReadinessStatus_minimax(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProvidersReadinessStatus",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Query_providers(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_providers(ctx, field)
if err != nil {
@@ -38036,6 +38220,8 @@ func (ec *executionContext) _DefaultProvidersConfig(ctx context.Context, sel ast
out.Values[i] = ec._DefaultProvidersConfig_kimi(ctx, field, obj)
case "qwen":
out.Values[i] = ec._DefaultProvidersConfig_qwen(ctx, field, obj)
+ case "minimax":
+ out.Values[i] = ec._DefaultProvidersConfig_minimax(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -39670,6 +39856,8 @@ func (ec *executionContext) _ProvidersModelsList(ctx context.Context, sel ast.Se
out.Values[i] = ec._ProvidersModelsList_kimi(ctx, field, obj)
case "qwen":
out.Values[i] = ec._ProvidersModelsList_qwen(ctx, field, obj)
+ case "minimax":
+ out.Values[i] = ec._ProvidersModelsList_minimax(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -39754,6 +39942,11 @@ func (ec *executionContext) _ProvidersReadinessStatus(ctx context.Context, sel a
if out.Values[i] == graphql.Null {
out.Invalids++
}
+ case "minimax":
+ out.Values[i] = ec._ProvidersReadinessStatus_minimax(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
default:
panic("unknown field " + strconv.Quote(field.Name))
}
diff --git a/backend/pkg/graph/model/models_gen.go b/backend/pkg/graph/model/models_gen.go
index 0d4cadce..78a63195 100644
--- a/backend/pkg/graph/model/models_gen.go
+++ b/backend/pkg/graph/model/models_gen.go
@@ -194,6 +194,7 @@ type DefaultProvidersConfig struct {
Glm *ProviderConfig `json:"glm,omitempty"`
Kimi *ProviderConfig `json:"kimi,omitempty"`
Qwen *ProviderConfig `json:"qwen,omitempty"`
+ Minimax *ProviderConfig `json:"minimax,omitempty"`
}
type Flow struct {
@@ -407,6 +408,7 @@ type ProvidersModelsList struct {
Glm []*ModelConfig `json:"glm,omitempty"`
Kimi []*ModelConfig `json:"kimi,omitempty"`
Qwen []*ModelConfig `json:"qwen,omitempty"`
+ Minimax []*ModelConfig `json:"minimax,omitempty"`
}
type ProvidersReadinessStatus struct {
@@ -420,6 +422,7 @@ type ProvidersReadinessStatus struct {
Glm bool `json:"glm"`
Kimi bool `json:"kimi"`
Qwen bool `json:"qwen"`
+ Minimax bool `json:"minimax"`
}
type Query struct {
@@ -1184,6 +1187,7 @@ const (
ProviderTypeGlm ProviderType = "glm"
ProviderTypeKimi ProviderType = "kimi"
ProviderTypeQwen ProviderType = "qwen"
+ ProviderTypeMinimax ProviderType = "minimax"
)
var AllProviderType = []ProviderType{
@@ -1197,11 +1201,12 @@ var AllProviderType = []ProviderType{
ProviderTypeGlm,
ProviderTypeKimi,
ProviderTypeQwen,
+ ProviderTypeMinimax,
}
func (e ProviderType) IsValid() bool {
switch e {
- case ProviderTypeOpenai, ProviderTypeAnthropic, ProviderTypeGemini, ProviderTypeBedrock, ProviderTypeOllama, ProviderTypeCustom, ProviderTypeDeepseek, ProviderTypeGlm, ProviderTypeKimi, ProviderTypeQwen:
+ case ProviderTypeOpenai, ProviderTypeAnthropic, ProviderTypeGemini, ProviderTypeBedrock, ProviderTypeOllama, ProviderTypeCustom, ProviderTypeDeepseek, ProviderTypeGlm, ProviderTypeKimi, ProviderTypeQwen, ProviderTypeMinimax:
return true
}
return false
diff --git a/backend/pkg/graph/schema.graphqls b/backend/pkg/graph/schema.graphqls
index 8ae99b60..2e2c4fe9 100644
--- a/backend/pkg/graph/schema.graphqls
+++ b/backend/pkg/graph/schema.graphqls
@@ -21,6 +21,7 @@ enum ProviderType {
glm
kimi
qwen
+ minimax
}
# Reasoning effort levels for advanced AI models
@@ -725,6 +726,7 @@ type ProvidersModelsList {
glm: [ModelConfig!]
kimi: [ModelConfig!]
qwen: [ModelConfig!]
+ minimax: [ModelConfig!]
}
# Provider availability status
@@ -739,6 +741,7 @@ type ProvidersReadinessStatus {
glm: Boolean!
kimi: Boolean!
qwen: Boolean!
+ minimax: Boolean!
}
# Default provider configurations
@@ -753,6 +756,7 @@ type DefaultProvidersConfig {
glm: ProviderConfig
kimi: ProviderConfig
qwen: ProviderConfig
+ minimax: ProviderConfig
}
# Complete providers configuration
diff --git a/backend/pkg/graph/schema.resolvers.go b/backend/pkg/graph/schema.resolvers.go
index 95f837f8..d8d1cc35 100644
--- a/backend/pkg/graph/schema.resolvers.go
+++ b/backend/pkg/graph/schema.resolvers.go
@@ -21,6 +21,7 @@ import (
"pentagi/pkg/providers/gemini"
"pentagi/pkg/providers/glm"
"pentagi/pkg/providers/kimi"
+ "pentagi/pkg/providers/minimax"
"pentagi/pkg/providers/openai"
"pentagi/pkg/providers/pconfig"
"pentagi/pkg/providers/provider"
@@ -2101,6 +2102,11 @@ func (r *queryResolver) SettingsProviders(ctx context.Context) (*model.Providers
if models, err := qwen.DefaultModels(); err == nil {
config.Models.Qwen = converter.ConvertModels(models)
}
+ case provider.ProviderMiniMax:
+ config.Default.Minimax = mpcfg
+ if models, err := minimax.DefaultModels(); err == nil {
+ config.Models.Minimax = converter.ConvertModels(models)
+ }
}
}
@@ -2133,6 +2139,8 @@ func (r *queryResolver) SettingsProviders(ctx context.Context) (*model.Providers
config.Enabled.Kimi = true
case provider.ProviderQwen:
config.Enabled.Qwen = true
+ case provider.ProviderMiniMax:
+ config.Enabled.Minimax = true
}
}
diff --git a/backend/pkg/providers/minimax/config.yml b/backend/pkg/providers/minimax/config.yml
new file mode 100644
index 00000000..c9ddde53
--- /dev/null
+++ b/backend/pkg/providers/minimax/config.yml
@@ -0,0 +1,130 @@
+simple:
+ model: MiniMax-M3
+ temperature: 0.5
+ top_p: 0.5
+ n: 1
+ max_tokens: 8192
+ price:
+ input: 0.60
+ output: 2.40
+
+simple_json:
+ model: MiniMax-M3
+ temperature: 0.5
+ top_p: 0.5
+ n: 1
+ max_tokens: 4096
+ json: true
+ price:
+ input: 0.60
+ output: 2.40
+
+primary_agent:
+ model: MiniMax-M3
+ temperature: 0.7
+ top_p: 0.8
+ n: 1
+ max_tokens: 16384
+ price:
+ input: 0.60
+ output: 2.40
+
+assistant:
+ model: MiniMax-M3
+ temperature: 0.7
+ top_p: 0.8
+ n: 1
+ max_tokens: 16384
+ price:
+ input: 0.60
+ output: 2.40
+
+generator:
+ model: MiniMax-M3
+ temperature: 0.7
+ top_p: 0.8
+ n: 1
+ max_tokens: 32768
+ price:
+ input: 0.60
+ output: 2.40
+
+refiner:
+ model: MiniMax-M3
+ temperature: 0.7
+ top_p: 0.8
+ n: 1
+ max_tokens: 20480
+ price:
+ input: 0.60
+ output: 2.40
+
+adviser:
+ model: MiniMax-M3
+ temperature: 0.7
+ top_p: 0.8
+ n: 1
+ max_tokens: 8192
+ price:
+ input: 0.60
+ output: 2.40
+
+reflector:
+ model: MiniMax-M3
+ temperature: 0.5
+ top_p: 0.5
+ n: 1
+ max_tokens: 4096
+ price:
+ input: 0.60
+ output: 2.40
+
+searcher:
+ model: MiniMax-M3
+ temperature: 0.7
+ top_p: 0.8
+ n: 1
+ max_tokens: 4096
+ price:
+ input: 0.60
+ output: 2.40
+
+enricher:
+ model: MiniMax-M3
+ temperature: 0.7
+ top_p: 0.8
+ n: 1
+ max_tokens: 4096
+ price:
+ input: 0.60
+ output: 2.40
+
+coder:
+ model: MiniMax-M3
+ temperature: 0.5
+ top_p: 0.5
+ n: 1
+ max_tokens: 20480
+ price:
+ input: 0.60
+ output: 2.40
+
+installer:
+ model: MiniMax-M3
+ temperature: 0.5
+ top_p: 0.5
+ n: 1
+ max_tokens: 16384
+ price:
+ input: 0.60
+ output: 2.40
+
+pentester:
+ model: MiniMax-M3
+ temperature: 0.5
+ top_p: 0.5
+ n: 1
+ max_tokens: 16384
+ price:
+ input: 0.60
+ output: 2.40
diff --git a/backend/pkg/providers/minimax/minimax.go b/backend/pkg/providers/minimax/minimax.go
new file mode 100644
index 00000000..fda2cb12
--- /dev/null
+++ b/backend/pkg/providers/minimax/minimax.go
@@ -0,0 +1,190 @@
+package minimax
+
+import (
+ "context"
+ "embed"
+ "fmt"
+
+ "pentagi/pkg/config"
+ "pentagi/pkg/providers/pconfig"
+ "pentagi/pkg/providers/provider"
+ "pentagi/pkg/system"
+ "pentagi/pkg/templates"
+
+ "github.com/vxcontrol/langchaingo/llms"
+ "github.com/vxcontrol/langchaingo/llms/openai"
+ "github.com/vxcontrol/langchaingo/llms/streaming"
+)
+
+//go:embed config.yml models.yml
+var configFS embed.FS
+
+const MiniMaxAgentModel = "MiniMax-M3"
+
+const MiniMaxToolCallIDTemplate = "call_{r:24:b}"
+
+func BuildProviderConfig(configData []byte) (*pconfig.ProviderConfig, error) {
+ defaultOptions := []llms.CallOption{
+ llms.WithModel(MiniMaxAgentModel),
+ llms.WithN(1),
+ llms.WithMaxTokens(4000),
+ }
+
+ providerConfig, err := pconfig.LoadConfigData(configData, defaultOptions)
+ if err != nil {
+ return nil, err
+ }
+
+ return providerConfig, nil
+}
+
+func DefaultProviderConfig() (*pconfig.ProviderConfig, error) {
+ configData, err := configFS.ReadFile("config.yml")
+ if err != nil {
+ return nil, err
+ }
+
+ return BuildProviderConfig(configData)
+}
+
+func DefaultModels() (pconfig.ModelsConfig, error) {
+ configData, err := configFS.ReadFile("models.yml")
+ if err != nil {
+ return nil, err
+ }
+
+ return pconfig.LoadModelsConfigData(configData)
+}
+
+type minimaxProvider struct {
+ llm *openai.LLM
+ models pconfig.ModelsConfig
+ providerName provider.ProviderName
+ providerConfig *pconfig.ProviderConfig
+ providerPrefix string
+}
+
+func New(
+ cfg *config.Config,
+ providerName provider.ProviderName,
+ providerConfig *pconfig.ProviderConfig,
+) (provider.Provider, error) {
+ if cfg.MiniMaxAPIKey == "" {
+ return nil, fmt.Errorf("missing MINIMAX_API_KEY environment variable")
+ }
+
+ httpClient, err := system.GetHTTPClient(cfg)
+ if err != nil {
+ return nil, err
+ }
+
+ models, err := DefaultModels()
+ if err != nil {
+ return nil, err
+ }
+
+ client, err := openai.New(
+ openai.WithToken(cfg.MiniMaxAPIKey),
+ openai.WithModel(MiniMaxAgentModel),
+ openai.WithBaseURL(cfg.MiniMaxServerURL),
+ openai.WithHTTPClient(httpClient),
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ return &minimaxProvider{
+ llm: client,
+ models: models,
+ providerName: providerName,
+ providerConfig: providerConfig,
+ providerPrefix: cfg.MiniMaxProvider,
+ }, nil
+}
+
+func (p *minimaxProvider) Type() provider.ProviderType {
+ return provider.ProviderMiniMax
+}
+
+func (p *minimaxProvider) Name() provider.ProviderName {
+ return p.providerName
+}
+
+func (p *minimaxProvider) GetRawConfig() []byte {
+ return p.providerConfig.GetRawConfig()
+}
+
+func (p *minimaxProvider) GetProviderConfig() *pconfig.ProviderConfig {
+ return p.providerConfig
+}
+
+func (p *minimaxProvider) GetPriceInfo(opt pconfig.ProviderOptionsType) *pconfig.PriceInfo {
+ return p.providerConfig.GetPriceInfoForType(opt)
+}
+
+func (p *minimaxProvider) GetModels() pconfig.ModelsConfig {
+ return p.models
+}
+
+func (p *minimaxProvider) Model(opt pconfig.ProviderOptionsType) string {
+ model := MiniMaxAgentModel
+ opts := llms.CallOptions{Model: &model}
+ for _, option := range p.providerConfig.GetOptionsForType(opt) {
+ option(&opts)
+ }
+
+ return opts.GetModel()
+}
+
+func (p *minimaxProvider) ModelWithPrefix(opt pconfig.ProviderOptionsType) string {
+ return provider.ApplyModelPrefix(p.Model(opt), p.providerPrefix)
+}
+
+func (p *minimaxProvider) Call(
+ ctx context.Context,
+ opt pconfig.ProviderOptionsType,
+ prompt string,
+) (string, error) {
+ return provider.WrapGenerateFromSinglePrompt(
+ ctx, p, opt, p.llm, prompt,
+ p.providerConfig.GetOptionsForType(opt)...,
+ )
+}
+
+func (p *minimaxProvider) CallEx(
+ ctx context.Context,
+ opt pconfig.ProviderOptionsType,
+ chain []llms.MessageContent,
+ streamCb streaming.Callback,
+) (*llms.ContentResponse, error) {
+ return provider.WrapGenerateContent(
+ ctx, p, opt, p.llm.GenerateContent, chain,
+ append([]llms.CallOption{
+ llms.WithStreamingFunc(streamCb),
+ }, p.providerConfig.GetOptionsForType(opt)...)...,
+ )
+}
+
+func (p *minimaxProvider) CallWithTools(
+ ctx context.Context,
+ opt pconfig.ProviderOptionsType,
+ chain []llms.MessageContent,
+ tools []llms.Tool,
+ streamCb streaming.Callback,
+) (*llms.ContentResponse, error) {
+ return provider.WrapGenerateContent(
+ ctx, p, opt, p.llm.GenerateContent, chain,
+ append([]llms.CallOption{
+ llms.WithTools(tools),
+ llms.WithStreamingFunc(streamCb),
+ }, p.providerConfig.GetOptionsForType(opt)...)...,
+ )
+}
+
+func (p *minimaxProvider) GetUsage(info map[string]any) pconfig.CallUsage {
+ return pconfig.NewCallUsage(info)
+}
+
+func (p *minimaxProvider) GetToolCallIDTemplate(ctx context.Context, prompter templates.Prompter) (string, error) {
+ return provider.DetermineToolCallIDTemplate(ctx, p, pconfig.OptionsTypeSimple, prompter, MiniMaxToolCallIDTemplate)
+}
diff --git a/backend/pkg/providers/minimax/minimax_test.go b/backend/pkg/providers/minimax/minimax_test.go
new file mode 100644
index 00000000..e4aa77e3
--- /dev/null
+++ b/backend/pkg/providers/minimax/minimax_test.go
@@ -0,0 +1,229 @@
+package minimax
+
+import (
+ "testing"
+
+ "pentagi/pkg/config"
+ "pentagi/pkg/providers/pconfig"
+ "pentagi/pkg/providers/provider"
+)
+
+func TestConfigLoading(t *testing.T) {
+ cfg := &config.Config{
+ MiniMaxAPIKey: "test-key",
+ MiniMaxServerURL: "https://api.minimax.io/v1",
+ }
+
+ providerConfig, err := DefaultProviderConfig()
+ if err != nil {
+ t.Fatalf("Failed to create provider config: %v", err)
+ }
+
+ prov, err := New(cfg, provider.DefaultProviderNameMiniMax, providerConfig)
+ if err != nil {
+ t.Fatalf("Failed to create provider: %v", err)
+ }
+
+ rawConfig := prov.GetRawConfig()
+ if len(rawConfig) == 0 {
+ t.Fatal("Raw config should not be empty")
+ }
+
+ providerConfig = prov.GetProviderConfig()
+ if providerConfig == nil {
+ t.Fatal("Provider config should not be nil")
+ }
+
+ for _, agentType := range pconfig.AllAgentTypes {
+ model := prov.Model(agentType)
+ if model == "" {
+ t.Errorf("Agent type %v should have a model assigned", agentType)
+ }
+ }
+
+ for _, agentType := range pconfig.AllAgentTypes {
+ priceInfo := prov.GetPriceInfo(agentType)
+ if priceInfo == nil {
+ t.Errorf("Agent type %v should have price information", agentType)
+ } else {
+ if priceInfo.Input <= 0 || priceInfo.Output <= 0 {
+ t.Errorf("Agent type %v should have positive input (%f) and output (%f) prices",
+ agentType, priceInfo.Input, priceInfo.Output)
+ }
+ }
+ }
+}
+
+func TestProviderType(t *testing.T) {
+ cfg := &config.Config{
+ MiniMaxAPIKey: "test-key",
+ MiniMaxServerURL: "https://api.minimax.io/v1",
+ }
+
+ providerConfig, err := DefaultProviderConfig()
+ if err != nil {
+ t.Fatalf("Failed to create provider config: %v", err)
+ }
+
+ prov, err := New(cfg, provider.DefaultProviderNameMiniMax, providerConfig)
+ if err != nil {
+ t.Fatalf("Failed to create provider: %v", err)
+ }
+
+ if prov.Type() != provider.ProviderMiniMax {
+ t.Errorf("Expected provider type %v, got %v", provider.ProviderMiniMax, prov.Type())
+ }
+}
+
+func TestModelsLoading(t *testing.T) {
+ models, err := DefaultModels()
+ if err != nil {
+ t.Fatalf("Failed to load models: %v", err)
+ }
+
+ if len(models) == 0 {
+ t.Fatal("Models list should not be empty")
+ }
+
+ wantModels := map[string]bool{
+ "MiniMax-M3": false,
+ "MiniMax-M2.7": false,
+ "MiniMax-M2.7-highspeed": false,
+ }
+
+ for _, model := range models {
+ if model.Name == "" {
+ t.Error("Model name should not be empty")
+ }
+
+ if model.Price == nil {
+ t.Errorf("Model %s should have price information", model.Name)
+ continue
+ }
+
+ if model.Price.Input <= 0 {
+ t.Errorf("Model %s should have positive input price", model.Name)
+ }
+
+ if model.Price.Output <= 0 {
+ t.Errorf("Model %s should have positive output price", model.Name)
+ }
+
+ if _, ok := wantModels[model.Name]; ok {
+ wantModels[model.Name] = true
+ }
+ }
+
+ for name, found := range wantModels {
+ if !found {
+ t.Errorf("Expected model %q in models list, but it was not found", name)
+ }
+ }
+
+ if models[0].Name != "MiniMax-M3" {
+ t.Errorf("Expected first model to be MiniMax-M3 (default), got %q", models[0].Name)
+ }
+
+ for _, model := range models {
+ if model.Name == "MiniMax-M2.5" || model.Name == "MiniMax-M2.5-highspeed" ||
+ model.Name == "MiniMax-M2.1" || model.Name == "MiniMax-M2" || model.Name == "MiniMax-M1" {
+ t.Errorf("Legacy model %q should not be in the model list", model.Name)
+ }
+ }
+}
+
+func TestModelWithPrefix(t *testing.T) {
+ cfg := &config.Config{
+ MiniMaxAPIKey: "test-key",
+ MiniMaxServerURL: "https://api.minimax.io/v1",
+ MiniMaxProvider: "minimax",
+ }
+
+ providerConfig, err := DefaultProviderConfig()
+ if err != nil {
+ t.Fatalf("Failed to create provider config: %v", err)
+ }
+
+ prov, err := New(cfg, provider.DefaultProviderNameMiniMax, providerConfig)
+ if err != nil {
+ t.Fatalf("Failed to create provider: %v", err)
+ }
+
+ for _, agentType := range pconfig.AllAgentTypes {
+ modelWithPrefix := prov.ModelWithPrefix(agentType)
+ model := prov.Model(agentType)
+
+ expected := "minimax/" + model
+ if modelWithPrefix != expected {
+ t.Errorf("Agent type %v: expected prefixed model %q, got %q", agentType, expected, modelWithPrefix)
+ }
+ }
+}
+
+func TestModelWithoutPrefix(t *testing.T) {
+ cfg := &config.Config{
+ MiniMaxAPIKey: "test-key",
+ MiniMaxServerURL: "https://api.minimax.io/v1",
+ }
+
+ providerConfig, err := DefaultProviderConfig()
+ if err != nil {
+ t.Fatalf("Failed to create provider config: %v", err)
+ }
+
+ prov, err := New(cfg, provider.DefaultProviderNameMiniMax, providerConfig)
+ if err != nil {
+ t.Fatalf("Failed to create provider: %v", err)
+ }
+
+ for _, agentType := range pconfig.AllAgentTypes {
+ modelWithPrefix := prov.ModelWithPrefix(agentType)
+ model := prov.Model(agentType)
+
+ if modelWithPrefix != model {
+ t.Errorf("Agent type %v: without prefix, ModelWithPrefix (%q) should equal Model (%q)",
+ agentType, modelWithPrefix, model)
+ }
+ }
+}
+
+func TestMissingAPIKey(t *testing.T) {
+ cfg := &config.Config{
+ MiniMaxServerURL: "https://api.minimax.io/v1",
+ }
+
+ providerConfig, err := DefaultProviderConfig()
+ if err != nil {
+ t.Fatalf("Failed to create provider config: %v", err)
+ }
+
+ _, err = New(cfg, provider.DefaultProviderNameMiniMax, providerConfig)
+ if err == nil {
+ t.Fatal("Expected error when API key is missing")
+ }
+}
+
+func TestGetUsage(t *testing.T) {
+ cfg := &config.Config{
+ MiniMaxAPIKey: "test-key",
+ MiniMaxServerURL: "https://api.minimax.io/v1",
+ }
+
+ providerConfig, err := DefaultProviderConfig()
+ if err != nil {
+ t.Fatalf("Failed to create provider config: %v", err)
+ }
+
+ prov, err := New(cfg, provider.DefaultProviderNameMiniMax, providerConfig)
+ if err != nil {
+ t.Fatalf("Failed to create provider: %v", err)
+ }
+
+ usage := prov.GetUsage(map[string]any{
+ "PromptTokens": 100,
+ "CompletionTokens": 50,
+ })
+ if usage.Input != 100 || usage.Output != 50 {
+ t.Errorf("Expected usage input=100 output=50, got input=%d output=%d", usage.Input, usage.Output)
+ }
+}
diff --git a/backend/pkg/providers/minimax/models.yml b/backend/pkg/providers/minimax/models.yml
new file mode 100644
index 00000000..c01dba6c
--- /dev/null
+++ b/backend/pkg/providers/minimax/models.yml
@@ -0,0 +1,20 @@
+- name: MiniMax-M3
+ description: MiniMax-M3 - Latest flagship M-series model with ~1M token context for agentic reasoning, tool use, code generation, and long-context tasks.
+ thinking: false
+ price:
+ input: 0.60
+ output: 2.40
+
+- name: MiniMax-M2.7
+ description: MiniMax-M2.7 - Previous flagship model with enhanced reasoning and coding capabilities. Supports tool calling, JSON output, and streaming.
+ thinking: false
+ price:
+ input: 0.40
+ output: 1.10
+
+- name: MiniMax-M2.7-highspeed
+ description: MiniMax-M2.7-highspeed - High-speed version of M2.7 for low-latency scenarios. Same capabilities as M2.7 with improved response latency.
+ thinking: false
+ price:
+ input: 0.40
+ output: 1.10
diff --git a/backend/pkg/providers/provider/provider.go b/backend/pkg/providers/provider/provider.go
index ecff39e4..b80b4aef 100644
--- a/backend/pkg/providers/provider/provider.go
+++ b/backend/pkg/providers/provider/provider.go
@@ -30,6 +30,7 @@ const (
ProviderGLM ProviderType = "glm"
ProviderKimi ProviderType = "kimi"
ProviderQwen ProviderType = "qwen"
+ ProviderMiniMax ProviderType = "minimax"
)
type ProviderName string
@@ -49,6 +50,7 @@ const (
DefaultProviderNameGLM ProviderName = ProviderName(ProviderGLM)
DefaultProviderNameKimi ProviderName = ProviderName(ProviderKimi)
DefaultProviderNameQwen ProviderName = ProviderName(ProviderQwen)
+ DefaultProviderNameMiniMax ProviderName = ProviderName(ProviderMiniMax)
)
type Provider interface {
diff --git a/backend/pkg/providers/providers.go b/backend/pkg/providers/providers.go
index 4ae6d360..23af1003 100644
--- a/backend/pkg/providers/providers.go
+++ b/backend/pkg/providers/providers.go
@@ -27,6 +27,7 @@ import (
"pentagi/pkg/providers/gemini"
"pentagi/pkg/providers/glm"
"pentagi/pkg/providers/kimi"
+ "pentagi/pkg/providers/minimax"
"pentagi/pkg/providers/ollama"
"pentagi/pkg/providers/openai"
"pentagi/pkg/providers/pconfig"
@@ -235,6 +236,12 @@ func NewProviderController(
defaultConfigs[provider.ProviderQwen] = config
}
+ if config, err := minimax.DefaultProviderConfig(); err != nil {
+ return nil, fmt.Errorf("failed to create minimax provider config: %w", err)
+ } else {
+ defaultConfigs[provider.ProviderMiniMax] = config
+ }
+
if cfg.OpenAIKey != "" {
p, err := openai.New(cfg, provider.DefaultProviderNameOpenAI, defaultConfigs[provider.ProviderOpenAI])
if err != nil {
@@ -328,6 +335,15 @@ func NewProviderController(
providers[provider.DefaultProviderNameQwen] = p
}
+ if cfg.MiniMaxAPIKey != "" {
+ p, err := minimax.New(cfg, provider.DefaultProviderNameMiniMax, defaultConfigs[provider.ProviderMiniMax])
+ if err != nil {
+ return nil, fmt.Errorf("failed to create minimax provider: %w", err)
+ }
+
+ providers[provider.DefaultProviderNameMiniMax] = p
+ }
+
summarizerAgent := csum.NewSummarizer(csum.SummarizerConfig{
PreserveLast: cfg.SummarizerPreserveLast,
UseQA: cfg.SummarizerUseQA,
@@ -734,6 +750,8 @@ func (pc *providerController) GetProvider(
return pc.Providers.Get(provider.DefaultProviderNameKimi)
case provider.DefaultProviderNameQwen:
return pc.Providers.Get(provider.DefaultProviderNameQwen)
+ case provider.DefaultProviderNameMiniMax:
+ return pc.Providers.Get(provider.DefaultProviderNameMiniMax)
}
return nil, fmt.Errorf("provider '%s' not found", prvname)
@@ -840,6 +858,12 @@ func (pc *providerController) NewProvider(prv database.Provider) (provider.Provi
return nil, fmt.Errorf("failed to build qwen provider config: %w", err)
}
return qwen.New(pc.cfg, providerName, qwenConfig)
+ case provider.ProviderMiniMax:
+ minimaxConfig, err := minimax.BuildProviderConfig(prv.Config)
+ if err != nil {
+ return nil, fmt.Errorf("failed to build minimax provider config: %w", err)
+ }
+ return minimax.New(pc.cfg, providerName, minimaxConfig)
default:
return nil, fmt.Errorf("unknown provider type: %s", prv.Type)
}
@@ -1178,6 +1202,8 @@ func (pc *providerController) buildProviderFromConfig(
return kimi.New(pc.cfg, prvname, config)
case provider.ProviderQwen:
return qwen.New(pc.cfg, prvname, config)
+ case provider.ProviderMiniMax:
+ return minimax.New(pc.cfg, prvname, config)
default:
return nil, fmt.Errorf("unknown provider type: %s", prvtype)
}
diff --git a/backend/pkg/server/models/providers.go b/backend/pkg/server/models/providers.go
index e20a46ed..12483ffe 100644
--- a/backend/pkg/server/models/providers.go
+++ b/backend/pkg/server/models/providers.go
@@ -29,7 +29,8 @@ func (s ProviderType) Valid() error {
provider.ProviderDeepSeek,
provider.ProviderGLM,
provider.ProviderKimi,
- provider.ProviderQwen:
+ provider.ProviderQwen,
+ provider.ProviderMiniMax:
return nil
default:
return fmt.Errorf("invalid ProviderType: %s", s)
diff --git a/frontend/graphql-schema.graphql b/frontend/graphql-schema.graphql
index e0af4b92..c26f35f7 100644
--- a/frontend/graphql-schema.graphql
+++ b/frontend/graphql-schema.graphql
@@ -560,6 +560,7 @@ query settingsProviders {
glm
kimi
qwen
+ minimax
}
default {
openai {
@@ -592,6 +593,9 @@ query settingsProviders {
qwen {
...providerConfigFragment
}
+ minimax {
+ ...providerConfigFragment
+ }
}
userDefined {
...providerConfigFragment
@@ -627,6 +631,9 @@ query settingsProviders {
qwen {
...modelConfigFragment
}
+ minimax {
+ ...modelConfigFragment
+ }
}
}
}
diff --git a/frontend/src/components/icons/minimax.tsx b/frontend/src/components/icons/minimax.tsx
new file mode 100644
index 00000000..290a39e0
--- /dev/null
+++ b/frontend/src/components/icons/minimax.tsx
@@ -0,0 +1,22 @@
+import { cn } from '@/lib/utils';
+
+interface MiniMaxProps extends React.SVGProps<SVGSVGElement> {
+ className?: string;
+}
+
+function MiniMax({ className, ...props }: MiniMaxProps) {
+ return (
+ <svg
+ className={cn(className)}
+ fill="currentColor"
+ fillRule="evenodd"
+ viewBox="0 0 24 24"
+ {...props}
+ >
+ <title>MiniMax</title>
+ <path d="M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z" />
+ </svg>
+ );
+}
+
+export default MiniMax;
diff --git a/frontend/src/components/icons/provider-icon.tsx b/frontend/src/components/icons/provider-icon.tsx
index 4648a095..c4c8ca33 100644
--- a/frontend/src/components/icons/provider-icon.tsx
+++ b/frontend/src/components/icons/provider-icon.tsx
@@ -13,6 +13,7 @@ import DeepSeek from './deepseek';
import Gemini from './gemini';
import GLM from './glm';
import Kimi from './kimi';
+import MiniMax from './minimax';
import Ollama from './ollama';
import OpenAi from './open-ai';
import Qwen from './qwen';
@@ -36,6 +37,7 @@ const providerIcons: Record<ProviderType, ProviderIconConfig> = {
[ProviderType.Gemini]: { className: 'text-blue-500', icon: Gemini },
[ProviderType.Glm]: { className: 'text-violet-500', icon: GLM },
[ProviderType.Kimi]: { className: 'text-sky-500', icon: Kimi },
+ [ProviderType.Minimax]: { className: 'text-red-500', icon: MiniMax },
[ProviderType.Ollama]: { className: 'text-blue-500', icon: Ollama },
[ProviderType.Openai]: { className: 'text-blue-500', icon: OpenAi },
[ProviderType.Qwen]: { className: 'text-orange-500', icon: Qwen },
diff --git a/frontend/src/graphql/types.ts b/frontend/src/graphql/types.ts
index edd61527..a1c26ad1 100644
--- a/frontend/src/graphql/types.ts
+++ b/frontend/src/graphql/types.ts
@@ -206,6 +206,7 @@ export enum ProviderType {
Gemini = 'gemini',
Glm = 'glm',
Kimi = 'kimi',
+ Minimax = 'minimax',
Ollama = 'ollama',
Openai = 'openai',
Qwen = 'qwen',
@@ -716,6 +717,7 @@ export type SettingsProvidersQuery = {
glm: boolean;
kimi: boolean;
qwen: boolean;
+ minimax: boolean;
};
default: {
openai: ProviderConfigFragmentFragment;
@@ -728,6 +730,7 @@ export type SettingsProvidersQuery = {
glm: ProviderConfigFragmentFragment | null;
kimi: ProviderConfigFragmentFragment | null;
qwen: ProviderConfigFragmentFragment | null;
+ minimax: ProviderConfigFragmentFragment | null;
};
userDefined: Array<ProviderConfigFragmentFragment> | null;
models: {
@@ -741,6 +744,7 @@ export type SettingsProvidersQuery = {
glm: Array<ModelConfigFragmentFragment> | null;
kimi: Array<ModelConfigFragmentFragment> | null;
qwen: Array<ModelConfigFragmentFragment> | null;
+ minimax: Array<ModelConfigFragmentFragment> | null;
};
};
};
@@ -3521,6 +3525,7 @@ export const SettingsProvidersDocument = {
{ kind: 'Field', name: { kind: 'Name', value: 'glm' } },
{ kind: 'Field', name: { kind: 'Name', value: 'kimi' } },
{ kind: 'Field', name: { kind: 'Name', value: 'qwen' } },
+ { kind: 'Field', name: { kind: 'Name', value: 'minimax' } },
],
},
},
@@ -3660,6 +3665,19 @@ export const SettingsProvidersDocument = {
],
},
},
+ {
+ kind: 'Field',
+ name: { kind: 'Name', value: 'minimax' },
+ selectionSet: {
+ kind: 'SelectionSet',
+ selections: [
+ {
+ kind: 'FragmentSpread',
+ name: { kind: 'Name', value: 'providerConfigFragment' },
+ },
+ ],
+ },
+ },
],
},
},
@@ -3812,6 +3830,19 @@ export const SettingsProvidersDocument = {
],
},
},
+ {
+ kind: 'Field',
+ name: { kind: 'Name', value: 'minimax' },
+ selectionSet: {
+ kind: 'SelectionSet',
+ selections: [
+ {
+ kind: 'FragmentSpread',
+ name: { kind: 'Name', value: 'modelConfigFragment' },
+ },
+ ],
+ },
+ },
],
},
},
diff --git a/frontend/src/pages/settings/settings-providers.tsx b/frontend/src/pages/settings/settings-providers.tsx
index d261eccb..4fd3fa5f 100644
--- a/frontend/src/pages/settings/settings-providers.tsx
+++ b/frontend/src/pages/settings/settings-providers.tsx
@@ -14,6 +14,7 @@ import DeepSeek from '@/components/icons/deepseek';
import Gemini from '@/components/icons/gemini';
import GLM from '@/components/icons/glm';
import Kimi from '@/components/icons/kimi';
+import MiniMax from '@/components/icons/minimax';
import Ollama from '@/components/icons/ollama';
import OpenAi from '@/components/icons/open-ai';
import Qwen from '@/components/icons/qwen';
@@ -45,6 +46,7 @@ const providerIcons: Record<ProviderType, React.ComponentType<React.SVGProps<SVG
[ProviderType.Gemini]: Gemini,
[ProviderType.Glm]: GLM,
[ProviderType.Kimi]: Kimi,
+ [ProviderType.Minimax]: MiniMax,
[ProviderType.Ollama]: Ollama,
[ProviderType.Openai]: OpenAi,
[ProviderType.Qwen]: Qwen,
@@ -58,6 +60,7 @@ const providerTypes = [
{ label: 'Gemini', type: ProviderType.Gemini },
{ label: 'GLM', type: ProviderType.Glm },
{ label: 'Kimi', type: ProviderType.Kimi },
+ { label: 'MiniMax', type: ProviderType.Minimax },
{ label: 'Ollama', type: ProviderType.Ollama },
{ label: 'OpenAI', type: ProviderType.Openai },
{ label: 'Qwen', type: ProviderType.Qwen },