diff --git a/config/config.example.json b/config/config.example.json index 094aa46df..2224cb28b 100644 --- a/config/config.example.json +++ b/config/config.example.json @@ -64,6 +64,12 @@ "model": "openai/gpt-5.4", "api_key": "sk-key2", "api_base": "https://api2.example.com/v1" + }, + { + "model_name": "MiniMax-M2.5", + "model": "modelscope/MiniMax/MiniMax-M2.5", + "api_key": "sk-key3", + "api_base": "https://api-inference.modelscope.cn/v1" } ], "channels": { diff --git a/pkg/providers/openai_compat/provider.go b/pkg/providers/openai_compat/provider.go index f97bf3acd..3a818b3ab 100644 --- a/pkg/providers/openai_compat/provider.go +++ b/pkg/providers/openai_compat/provider.go @@ -464,6 +464,8 @@ func normalizeModel(model, apiBase string) string { if strings.Contains(strings.ToLower(apiBase), "openrouter.ai") { return model + } else if strings.Contains(strings.ToLower(apiBase), "api-inference.modelscope.cn") { + return model } prefix := strings.ToLower(before) diff --git a/web/frontend/src/components/models/provider-icon.tsx b/web/frontend/src/components/models/provider-icon.tsx index 5e2151e2d..a6b0db44d 100644 --- a/web/frontend/src/components/models/provider-icon.tsx +++ b/web/frontend/src/components/models/provider-icon.tsx @@ -15,6 +15,7 @@ const PROVIDER_ICON_SLUGS: Record = { ollama: "ollama", mistral: "mistralai", zhipu: "zhipu", + modelscope: "modelscope", } const PROVIDER_DOMAINS: Record = { @@ -37,6 +38,7 @@ const PROVIDER_DOMAINS: Record = { avian: "avian.io", vllm: "vllm.ai", zhipu: "zhipuai.cn", + modelscope: "modelscope.cn", } interface ProviderIconProps {