mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-09-01 17:10:24 +08:00
feat: add MiMo (Xiaomi) as AI provider (#887)
* feat: add MiMo (Xiaomi) as AI provider * fix: correct MiMo default base URL, suggested models, and reasoning support - Default base URL was the China Token Plan endpoint (tp- keys only); switch to https://api.xiaomimimo.com/v1 which works with standard pay-as-you-go sk- keys. Token Plan users can override in settings. - Replace deprecated mimo-v2-flash suggestion with mimo-v2.5 (v2 series was deprecated on 2026-06-30). - Use createDeepSeek instead of createOpenAI so reasoning_content is passed back during multi-turn tool calls (MiMo returns 400 without it), matching the existing Kimi implementation. - Add mimo to SINGLE_SYSTEM_PROVIDERS so system messages are merged. - Fold validate-model case into the shared OpenAI-compatible group. - Drop the Bot icon special case; models.dev serves a real xiaomi logo via PROVIDER_LOGO_MAP. - Document MIMO_API_KEY/MIMO_BASE_URL in env.example and docs/{en,cn,ja}/ai-providers.md. * feat: show base URL hint for MiMo in provider settings MiMo has two endpoints tied to key type: pay-as-you-go keys (sk-...) use the default api.xiaomimimo.com/v1, while Token Plan keys (tp-...) require token-plan-cn.xiaomimimo.com/v1. Surface this under the Base URL field like the existing MiniMax hint, in all four locales. --------- Co-authored-by: mapengfei <mapengfei@srsj.com> Co-authored-by: dayuan.jiang <jdy.toh@gmail.com>
This commit is contained in:
@@ -308,6 +308,19 @@ AI_MODEL=your_model_id
|
||||
QINIU_BASE_URL=https://your-custom-endpoint
|
||||
```
|
||||
|
||||
### MiMo (小米)
|
||||
|
||||
```bash
|
||||
MIMO_API_KEY=your_api_key
|
||||
AI_MODEL=mimo-v2.5-pro
|
||||
```
|
||||
|
||||
可选的自定义端点(Token Plan 订阅用户请设置专属 Base URL):
|
||||
|
||||
```bash
|
||||
MIMO_BASE_URL=https://token-plan-cn.xiaomimimo.com/v1
|
||||
```
|
||||
|
||||
## 自动检测
|
||||
|
||||
如果您只配置了**一个**提供商的 API 密钥,系统将自动检测并使用该提供商。无需设置 `AI_PROVIDER`。
|
||||
@@ -315,7 +328,7 @@ QINIU_BASE_URL=https://your-custom-endpoint
|
||||
如果您配置了**多个** API 密钥,则必须显式设置 `AI_PROVIDER`:
|
||||
|
||||
```bash
|
||||
AI_PROVIDER=google # 或:openai, anthropic, aihubmix, deepseek, siliconflow, doubao, azure, bedrock, openrouter, ollama, gateway, sglang, modelscope, minimax, glm, qwen, kimi, qiniu
|
||||
AI_PROVIDER=google # 或:openai, anthropic, aihubmix, deepseek, siliconflow, doubao, azure, bedrock, openrouter, ollama, gateway, sglang, modelscope, minimax, glm, qwen, kimi, qiniu, mimo
|
||||
```
|
||||
|
||||
## 服务端多模型配置
|
||||
|
||||
Reference in New Issue
Block a user