diff --git a/src/renderer/src/aiCore/utils/reasoning.ts b/src/renderer/src/aiCore/utils/reasoning.ts index 9320fb8e5..a2364d97e 100644 --- a/src/renderer/src/aiCore/utils/reasoning.ts +++ b/src/renderer/src/aiCore/utils/reasoning.ts @@ -29,6 +29,7 @@ import { isSupportedThinkingTokenDoubaoModel, isSupportedThinkingTokenGeminiModel, isSupportedThinkingTokenHunyuanModel, + isSupportedThinkingTokenMiMoModel, isSupportedThinkingTokenModel, isSupportedThinkingTokenQwenModel, isSupportedThinkingTokenZhipuModel @@ -409,6 +410,12 @@ export function getReasoningEffort(assistant: Assistant, model: Model): Reasonin return { thinking: { type: 'enabled' } } } + if (isSupportedThinkingTokenMiMoModel(model)) { + return { + thinking: { type: 'enabled' } + } + } + // Default case: no special thinking settings return {} } diff --git a/src/renderer/src/assets/images/models/mimo.svg b/src/renderer/src/assets/images/models/mimo.svg new file mode 100644 index 000000000..82370fece --- /dev/null +++ b/src/renderer/src/assets/images/models/mimo.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/renderer/src/assets/images/providers/mimo.svg b/src/renderer/src/assets/images/providers/mimo.svg new file mode 100644 index 000000000..82370fece --- /dev/null +++ b/src/renderer/src/assets/images/providers/mimo.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/renderer/src/config/models/default.ts b/src/renderer/src/config/models/default.ts index 66368d35f..37854c574 100644 --- a/src/renderer/src/config/models/default.ts +++ b/src/renderer/src/config/models/default.ts @@ -1791,5 +1791,13 @@ export const SYSTEM_MODELS: Record = provider: 'cerebras', group: 'qwen' } + ], + mimo: [ + { + id: 'mimo-v2-flash', + name: 'Mimo V2 Flash', + provider: 'mimo', + group: 'Mimo' + } ] } diff --git a/src/renderer/src/config/models/logo.ts b/src/renderer/src/config/models/logo.ts index fe1a919c5..75ad71f66 100644 --- a/src/renderer/src/config/models/logo.ts +++ b/src/renderer/src/config/models/logo.ts @@ -103,6 +103,7 @@ import MicrosoftModelLogo from '@renderer/assets/images/models/microsoft.png' import MicrosoftModelLogoDark from '@renderer/assets/images/models/microsoft_dark.png' import MidjourneyModelLogo from '@renderer/assets/images/models/midjourney.png' import MidjourneyModelLogoDark from '@renderer/assets/images/models/midjourney_dark.png' +import MiMoModelLogo from '@renderer/assets/images/models/mimo.svg' import { default as MinicpmModelLogo, default as MinicpmModelLogoDark @@ -301,7 +302,8 @@ export function getModelLogoById(modelId: string): string | undefined { bytedance: BytedanceModelLogo, ling: LingModelLogo, ring: LingModelLogo, - '(V_1|V_1_TURBO|V_2|V_2A|V_2_TURBO|DESCRIBE|UPSCALE)': IdeogramModelLogo + '(V_1|V_1_TURBO|V_2|V_2A|V_2_TURBO|DESCRIBE|UPSCALE)': IdeogramModelLogo, + mimo: MiMoModelLogo } as const satisfies Record for (const key in logoMap) { diff --git a/src/renderer/src/config/models/reasoning.ts b/src/renderer/src/config/models/reasoning.ts index 14174d162..faa04721e 100644 --- a/src/renderer/src/config/models/reasoning.ts +++ b/src/renderer/src/config/models/reasoning.ts @@ -52,6 +52,7 @@ export const MODEL_SUPPORTED_REASONING_EFFORT = { doubao_no_auto: ['high'] as const, doubao_after_251015: ['minimal', 'low', 'medium', 'high'] as const, hunyuan: ['auto'] as const, + mimo: ['auto'] as const, zhipu: ['auto'] as const, perplexity: ['low', 'medium', 'high'] as const, deepseek_hybrid: ['auto'] as const @@ -80,6 +81,7 @@ export const MODEL_SUPPORTED_OPTIONS: ThinkingOptionConfig = { doubao: ['default', 'none', ...MODEL_SUPPORTED_REASONING_EFFORT.doubao] as const, doubao_no_auto: ['default', 'none', ...MODEL_SUPPORTED_REASONING_EFFORT.doubao_no_auto] as const, doubao_after_251015: ['default', ...MODEL_SUPPORTED_REASONING_EFFORT.doubao_after_251015] as const, + mimo: ['default', 'none', ...MODEL_SUPPORTED_REASONING_EFFORT.mimo] as const, hunyuan: ['default', 'none', ...MODEL_SUPPORTED_REASONING_EFFORT.hunyuan] as const, zhipu: ['default', 'none', ...MODEL_SUPPORTED_REASONING_EFFORT.zhipu] as const, perplexity: ['default', ...MODEL_SUPPORTED_REASONING_EFFORT.perplexity] as const, @@ -155,6 +157,7 @@ const _getThinkModelType = (model: Model): ThinkingModelType => { else if (isSupportedReasoningEffortPerplexityModel(model)) thinkingModelType = 'perplexity' else if (isSupportedThinkingTokenZhipuModel(model)) thinkingModelType = 'zhipu' else if (isDeepSeekHybridInferenceModel(model)) thinkingModelType = 'deepseek_hybrid' + else if (isSupportedThinkingTokenMiMoModel(model)) thinkingModelType = 'mimo' return thinkingModelType } @@ -263,7 +266,8 @@ function _isSupportedThinkingTokenModel(model: Model): boolean { isSupportedThinkingTokenClaudeModel(model) || isSupportedThinkingTokenDoubaoModel(model) || isSupportedThinkingTokenHunyuanModel(model) || - isSupportedThinkingTokenZhipuModel(model) + isSupportedThinkingTokenZhipuModel(model) || + isSupportedThinkingTokenMiMoModel(model) ) } @@ -561,6 +565,11 @@ export const isSupportedThinkingTokenZhipuModel = (model: Model): boolean => { return ['glm-4.5', 'glm-4.6'].some((id) => modelId.includes(id)) } +export const isSupportedThinkingTokenMiMoModel = (model: Model): boolean => { + const modelId = getLowerBaseModelName(model.id, '/') + return ['mimo-v2-flash'].some((id) => modelId.includes(id)) +} + export const isDeepSeekHybridInferenceModel = (model: Model) => { const { idResult, nameResult } = withModelIdAndNameAsId(model, (model) => { const modelId = getLowerBaseModelName(model.id) @@ -599,6 +608,8 @@ export const isZhipuReasoningModel = (model?: Model): boolean => { return isSupportedThinkingTokenZhipuModel(model) || modelId.includes('glm-z1') } +export const isMiMoReasoningModel = isSupportedThinkingTokenMiMoModel + export const isStepReasoningModel = (model?: Model): boolean => { if (!model) { return false @@ -649,6 +660,7 @@ export function isReasoningModel(model?: Model): boolean { isDeepSeekHybridInferenceModel(model) || isLingReasoningModel(model) || isMiniMaxReasoningModel(model) || + isMiMoReasoningModel(model) || modelId.includes('magistral') || modelId.includes('pangu-pro-moe') || modelId.includes('seed-oss') || diff --git a/src/renderer/src/config/models/tooluse.ts b/src/renderer/src/config/models/tooluse.ts index 66e2dcc20..54d371dfd 100644 --- a/src/renderer/src/config/models/tooluse.ts +++ b/src/renderer/src/config/models/tooluse.ts @@ -30,7 +30,8 @@ export const FUNCTION_CALLING_MODELS = [ 'kimi-k2(?:-[\\w-]+)?', 'ling-\\w+(?:-[\\w-]+)?', 'ring-\\w+(?:-[\\w-]+)?', - 'minimax-m2' + 'minimax-m2', + 'mimo-v2-flash' ] as const const FUNCTION_CALLING_EXCLUDED_MODELS = [ diff --git a/src/renderer/src/config/providers.ts b/src/renderer/src/config/providers.ts index bc32ef349..1adeb58ad 100644 --- a/src/renderer/src/config/providers.ts +++ b/src/renderer/src/config/providers.ts @@ -31,6 +31,7 @@ import JinaProviderLogo from '@renderer/assets/images/providers/jina.png' import LanyunProviderLogo from '@renderer/assets/images/providers/lanyun.png' import LMStudioProviderLogo from '@renderer/assets/images/providers/lmstudio.png' import LongCatProviderLogo from '@renderer/assets/images/providers/longcat.png' +import MiMoProviderLogo from '@renderer/assets/images/providers/mimo.svg' import MinimaxProviderLogo from '@renderer/assets/images/providers/minimax.png' import MistralProviderLogo from '@renderer/assets/images/providers/mistral.png' import ModelScopeProviderLogo from '@renderer/assets/images/providers/modelscope.png' @@ -695,6 +696,17 @@ export const SYSTEM_PROVIDERS_CONFIG: Record = models: SYSTEM_MODELS.cerebras, isSystem: true, enabled: false + }, + mimo: { + id: 'mimo', + name: 'Xiaomi MiMo', + type: 'openai', + apiKey: '', + apiHost: 'https://api.xiaomimimo.com', + anthropicApiHost: 'https://api.xiaomimimo.com/anthropic', + models: SYSTEM_MODELS.mimo, + isSystem: true, + enabled: false } } as const @@ -763,7 +775,8 @@ export const PROVIDER_LOGO_MAP: AtLeast = { huggingface: HuggingfaceProviderLogo, sophnet: SophnetProviderLogo, gateway: AIGatewayProviderLogo, - cerebras: CerebrasProviderLogo + cerebras: CerebrasProviderLogo, + mimo: MiMoProviderLogo } as const export function getProviderLogo(providerId: string) { @@ -1434,5 +1447,16 @@ export const PROVIDER_URLS: Record = { docs: 'https://inference-docs.cerebras.ai/introduction', models: 'https://inference-docs.cerebras.ai/models/overview' } + }, + mimo: { + api: { + url: 'https://api.xiaomimimo.com' + }, + websites: { + official: 'https://platform.xiaomimimo.com/', + apiKey: 'https://platform.xiaomimimo.com/#/console/usage', + docs: 'https://platform.xiaomimimo.com/#/docs/welcome', + models: 'https://platform.xiaomimimo.com/' + } } } diff --git a/src/renderer/src/i18n/label.ts b/src/renderer/src/i18n/label.ts index ce36282b2..2e6f84026 100644 --- a/src/renderer/src/i18n/label.ts +++ b/src/renderer/src/i18n/label.ts @@ -88,7 +88,8 @@ const providerKeyMap = { huggingface: 'provider.huggingface', sophnet: 'provider.sophnet', gateway: 'provider.ai-gateway', - cerebras: 'provider.cerebras' + cerebras: 'provider.cerebras', + mimo: 'provider.mimo' } as const /** diff --git a/src/renderer/src/i18n/locales/en-us.json b/src/renderer/src/i18n/locales/en-us.json index 08c282720..f4012363e 100644 --- a/src/renderer/src/i18n/locales/en-us.json +++ b/src/renderer/src/i18n/locales/en-us.json @@ -2643,6 +2643,7 @@ "lanyun": "LANYUN", "lmstudio": "LM Studio", "longcat": "LongCat AI", + "mimo": "Xiaomi MiMo", "minimax": "MiniMax", "mistral": "Mistral", "modelscope": "ModelScope", diff --git a/src/renderer/src/i18n/locales/zh-cn.json b/src/renderer/src/i18n/locales/zh-cn.json index fa73a4649..f0d4adf4c 100644 --- a/src/renderer/src/i18n/locales/zh-cn.json +++ b/src/renderer/src/i18n/locales/zh-cn.json @@ -2643,6 +2643,7 @@ "lanyun": "蓝耘科技", "lmstudio": "LM Studio", "longcat": "龙猫", + "mimo": "Xiaomi MiMo", "minimax": "MiniMax", "mistral": "Mistral", "modelscope": "ModelScope 魔搭", diff --git a/src/renderer/src/i18n/locales/zh-tw.json b/src/renderer/src/i18n/locales/zh-tw.json index e8128f33a..9625c6838 100644 --- a/src/renderer/src/i18n/locales/zh-tw.json +++ b/src/renderer/src/i18n/locales/zh-tw.json @@ -2643,6 +2643,7 @@ "lanyun": "藍耘", "lmstudio": "LM Studio", "longcat": "龍貓", + "mimo": "[to be translated]:Xiaomi MiMo", "minimax": "MiniMax", "mistral": "Mistral", "modelscope": "ModelScope 魔搭", diff --git a/src/renderer/src/i18n/translate/de-de.json b/src/renderer/src/i18n/translate/de-de.json index 3d3243654..b3acb4995 100644 --- a/src/renderer/src/i18n/translate/de-de.json +++ b/src/renderer/src/i18n/translate/de-de.json @@ -2643,6 +2643,7 @@ "lanyun": "Lanyun Technologie", "lmstudio": "LM Studio", "longcat": "Meißner Riesenhamster", + "mimo": "[to be translated]:Xiaomi MiMo", "minimax": "MiniMax", "mistral": "Mistral", "modelscope": "ModelScope", diff --git a/src/renderer/src/i18n/translate/el-gr.json b/src/renderer/src/i18n/translate/el-gr.json index 2f9ef72b2..ae7b85564 100644 --- a/src/renderer/src/i18n/translate/el-gr.json +++ b/src/renderer/src/i18n/translate/el-gr.json @@ -2643,6 +2643,7 @@ "lanyun": "Λανιούν Τεχνολογία", "lmstudio": "LM Studio", "longcat": "Τσίρο", + "mimo": "[to be translated]:Xiaomi MiMo", "minimax": "MiniMax", "mistral": "Mistral", "modelscope": "ModelScope Magpie", diff --git a/src/renderer/src/i18n/translate/es-es.json b/src/renderer/src/i18n/translate/es-es.json index adebbfa31..26b499cba 100644 --- a/src/renderer/src/i18n/translate/es-es.json +++ b/src/renderer/src/i18n/translate/es-es.json @@ -2643,6 +2643,7 @@ "lanyun": "Tecnología Lanyun", "lmstudio": "Estudio LM", "longcat": "Totoro", + "mimo": "[to be translated]:Xiaomi MiMo", "minimax": "Minimax", "mistral": "Mistral", "modelscope": "ModelScope Módulo", diff --git a/src/renderer/src/i18n/translate/fr-fr.json b/src/renderer/src/i18n/translate/fr-fr.json index 7b24f5767..4dff56d7e 100644 --- a/src/renderer/src/i18n/translate/fr-fr.json +++ b/src/renderer/src/i18n/translate/fr-fr.json @@ -2643,6 +2643,7 @@ "lanyun": "Technologie Lan Yun", "lmstudio": "Studio LM", "longcat": "Mon voisin Totoro", + "mimo": "[to be translated]:Xiaomi MiMo", "minimax": "MiniMax", "mistral": "Mistral", "modelscope": "ModelScope MoDa", diff --git a/src/renderer/src/i18n/translate/ja-jp.json b/src/renderer/src/i18n/translate/ja-jp.json index e3b9fc77e..090a1927c 100644 --- a/src/renderer/src/i18n/translate/ja-jp.json +++ b/src/renderer/src/i18n/translate/ja-jp.json @@ -2643,6 +2643,7 @@ "lanyun": "LANYUN", "lmstudio": "LM Studio", "longcat": "トトロ", + "mimo": "[to be translated]:Xiaomi MiMo", "minimax": "MiniMax", "mistral": "Mistral", "modelscope": "ModelScope", diff --git a/src/renderer/src/i18n/translate/pt-pt.json b/src/renderer/src/i18n/translate/pt-pt.json index 10b5a12e1..50cc4fae0 100644 --- a/src/renderer/src/i18n/translate/pt-pt.json +++ b/src/renderer/src/i18n/translate/pt-pt.json @@ -2643,6 +2643,7 @@ "lanyun": "Lanyun Tecnologia", "lmstudio": "Estúdio LM", "longcat": "Totoro", + "mimo": "[to be translated]:Xiaomi MiMo", "minimax": "Minimax", "mistral": "Mistral", "modelscope": "ModelScope MôDá", diff --git a/src/renderer/src/i18n/translate/ru-ru.json b/src/renderer/src/i18n/translate/ru-ru.json index 645fbaeeb..8a6a78145 100644 --- a/src/renderer/src/i18n/translate/ru-ru.json +++ b/src/renderer/src/i18n/translate/ru-ru.json @@ -2643,6 +2643,7 @@ "lanyun": "LANYUN", "lmstudio": "LM Studio", "longcat": "Тоторо", + "mimo": "[to be translated]:Xiaomi MiMo", "minimax": "MiniMax", "mistral": "Mistral", "modelscope": "ModelScope", diff --git a/src/renderer/src/pages/settings/ProviderSettings/ProviderSetting.tsx b/src/renderer/src/pages/settings/ProviderSettings/ProviderSetting.tsx index 85f54fce8..049c14c0d 100644 --- a/src/renderer/src/pages/settings/ProviderSettings/ProviderSetting.tsx +++ b/src/renderer/src/pages/settings/ProviderSettings/ProviderSetting.tsx @@ -80,7 +80,8 @@ const ANTHROPIC_COMPATIBLE_PROVIDER_IDS = [ SystemProviderIds.minimax, SystemProviderIds.silicon, SystemProviderIds.qiniu, - SystemProviderIds.dmxapi + SystemProviderIds.dmxapi, + SystemProviderIds.mimo ] as const type AnthropicCompatibleProviderId = (typeof ANTHROPIC_COMPATIBLE_PROVIDER_IDS)[number] diff --git a/src/renderer/src/store/migrate.ts b/src/renderer/src/store/migrate.ts index f085db230..5fe1bc090 100644 --- a/src/renderer/src/store/migrate.ts +++ b/src/renderer/src/store/migrate.ts @@ -3046,6 +3046,7 @@ const migrateConfig = { assistant.settings.reasoning_effort = 'default' } }) + addProvider(state, 'mimo') logger.info('migrate 187 success') return state } catch (error) { diff --git a/src/renderer/src/types/index.ts b/src/renderer/src/types/index.ts index 9ac3199f3..b5707f81f 100644 --- a/src/renderer/src/types/index.ts +++ b/src/renderer/src/types/index.ts @@ -102,6 +102,7 @@ const ThinkModelTypes = [ 'doubao', 'doubao_no_auto', 'doubao_after_251015', + 'mimo', 'hunyuan', 'zhipu', 'perplexity', diff --git a/src/renderer/src/types/provider.ts b/src/renderer/src/types/provider.ts index 4e3e34760..edab3a730 100644 --- a/src/renderer/src/types/provider.ts +++ b/src/renderer/src/types/provider.ts @@ -189,7 +189,8 @@ export const SystemProviderIdSchema = z.enum([ 'huggingface', 'sophnet', 'gateway', - 'cerebras' + 'cerebras', + 'mimo' ]) export type SystemProviderId = z.infer @@ -258,7 +259,8 @@ export const SystemProviderIds = { longcat: 'longcat', huggingface: 'huggingface', gateway: 'gateway', - cerebras: 'cerebras' + cerebras: 'cerebras', + mimo: 'mimo' } as const satisfies Record type SystemProviderIdTypeMap = typeof SystemProviderIds