diff --git a/README.en.md b/README.en.md index 8f5ac4775..7d269cc54 100644 --- a/README.en.md +++ b/README.en.md @@ -163,7 +163,7 @@ macOS builds are **not yet signed with an Apple Developer ID** and **not yet Not |---|---|---|---|---| | Kimi (Moonshot Platform / Kimi For Coding) | ✅ | ✅ | ✅ | Thinking 3-layer defense; Kimi Code plan quota shown via console session (see usage notes below) | | DeepSeek V4 (incl. Max thinking) | ✅ | ✅ | ✅ | Vision input stripped to avoid 400; xhigh → real max effort (#254) | -| Xiaomi MiMo (Token Plan / Pay for Token) | ✅ | ✅ | ✅ | **Now uses native responses protocol passthrough** | +| Xiaomi MiMo (Token Plan / Pay for Token) | ✅ | ✅ | ✅ | Image-only requests get space text-part fallback | | MiniMax M3 (1M) / M2.x / Text-01 | ✅ | ✅ | ✅ | `role=system` → user (v2.1.6 fix for 400); M3 context 1M; compact keeps tool-call args valid JSON (#356) | | OpenCode Go (`opencode.ai/zen/go/v1`, openai_chat) | ✅ | ✅ | ✅ | Low-cost open-source coding model subscription ($5 first month / $10/mo); GLM/Kimi/DeepSeek/MiMo family via /chat/completions; MiniMax/Qwen via /messages (not in this preset); 5h/weekly/monthly plan quota via console session (see usage notes below) | | Google AI Studio (`gemini_native`) | ✅ | ✅ | ✅ | Auto-selects Gemini 3 `/v1alpha` + Gemini 2.x `/v1beta` | diff --git a/README.md b/README.md index a82f4736c..c5b4d0e02 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ macOS 暂未做 **Apple Developer ID 代码签名** 与 **Apple 公证(Notarizat |---|---|---|---|---| | Kimi(Moonshot Platform / Kimi For Coding) | ✅ | ✅ | ✅ | thinking 三层防御;Kimi Code 套餐用量经控制台 session 显示(见下方用量说明) | | DeepSeek V4(含 Max 思维) | ✅ | ✅ | ✅ | 视觉输入剥离避免 400;xhigh → max 真实到达(#254) | -| Xiaomi MiMo(Token Plan / Pay for Token) | ✅ | ✅ | ✅ | **已切原生 responses 协议直连** | +| Xiaomi MiMo(Token Plan / Pay for Token) | ✅ | ✅ | ✅ | 纯图请求兜底空格 text part | | MiniMax M3(1M)/ M2.x / Text-01 | ✅ | ✅ | ✅ | `role=system` 转 user 防 400(v2.1.6);M3 上下文 1M;compact 截断工具参数保持合法 JSON(#356) | | OpenCode Go(`opencode.ai/zen/go/v1`,openai_chat) | ✅ | ✅ | ✅ | 低成本开源编程模型订阅($5 首月/$10 月);GLM/Kimi/DeepSeek/MiMo 系走 /chat/completions;MiniMax/Qwen 系走 /messages(不在此 preset);5h/周/月三档套餐用量经控制台 session 显示(见下方用量说明) | | Google AI Studio(`gemini_native`) | ✅ | ✅ | ✅ | Gemini 3 `/v1alpha` + Gemini 2.x `/v1beta` 自动选 | diff --git a/crates/registry/src/healing.rs b/crates/registry/src/healing.rs index c84162dcc..a1cf5e308 100644 --- a/crates/registry/src/healing.rs +++ b/crates/registry/src/healing.rs @@ -662,14 +662,14 @@ mod tests { "name": "Xiaomi MiMo (Token Plan)", "baseUrl": "https://token-plan-sgp.xiaomimimo.com/v1", "isBuiltin": false, - "apiFormat": "openai_chat" // 错误值,需被覆盖回 preset 的 responses + "apiFormat": "responses" // 错误值,需被覆盖回 preset 的 openai_chat } ] }); let changed = heal_builtin_provider_fields(&mut cfg); assert!(changed); let p = &cfg["providers"][0]; - assert_eq!(p["apiFormat"], "responses"); + assert_eq!(p["apiFormat"], "openai_chat"); assert_eq!(p["isBuiltin"], json!(true)); assert_eq!( p["baseUrl"], "https://token-plan-sgp.xiaomimimo.com/v1", @@ -679,15 +679,15 @@ mod tests { #[test] fn forces_apiformat_override_even_if_user_edited_to_bogus_value() { - // 用户手改把 apiFormat 改成 "responses" + // 关键回归(2026-05-08 MiMo 404):用户手改把 apiFormat 改成 "responses" // → apply 跳过代理直连上游 → 404 // 新策略:命中 preset 即强制覆盖,不管用户改成了什么。 let mut cfg = json!({ "providers": [ { - "id": "deepseek", - "name": "DeepSeek", - "baseUrl": "https://api.deepseek.com", + "id": "xiaomi-mimo-token-plan", + "name": "Xiaomi MiMo (Token Plan)", + "baseUrl": "https://token-plan-cn.xiaomimimo.com/v1", "isBuiltin": true, "apiFormat": "responses", "extraHeaders": {} @@ -698,7 +698,7 @@ mod tests { assert!(changed); assert_eq!( cfg["providers"][0]["apiFormat"], "openai_chat", - "DeepSeek apiFormat 必须被强制覆盖回 preset 的 openai_chat" + "MiMo apiFormat 必须被强制覆盖回 preset 的 openai_chat" ); } diff --git a/crates/registry/src/presets_data.json b/crates/registry/src/presets_data.json index 6fea434e3..f24c562a5 100644 --- a/crates/registry/src/presets_data.json +++ b/crates/registry/src/presets_data.json @@ -99,7 +99,7 @@ "baseUrl": "https://api.xiaomimimo.com/v1", "docsUrl": "https://www.mimo-v2.com/zh/docs/quick-start/first-api-call", "authScheme": "bearer", - "apiFormat": "responses", + "apiFormat": "openai_chat", "models": { "default": "mimo-v2.5-pro" }, @@ -132,7 +132,7 @@ "baseUrl": "https://token-plan-cn.xiaomimimo.com/v1", "docsUrl": "https://www.mimo-v2.com/zh/docs/quick-start/first-api-call", "authScheme": "bearer", - "apiFormat": "responses", + "apiFormat": "openai_chat", "baseUrlOptions": [ { "label": "中国集群", diff --git a/tests/replay/fixtures/registry/builtin_presets.json b/tests/replay/fixtures/registry/builtin_presets.json index 9846e2d5e..05fe89a36 100644 --- a/tests/replay/fixtures/registry/builtin_presets.json +++ b/tests/replay/fixtures/registry/builtin_presets.json @@ -99,7 +99,7 @@ "baseUrl": "https://api.xiaomimimo.com/v1", "docsUrl": "https://www.mimo-v2.com/zh/docs/quick-start/first-api-call", "authScheme": "bearer", - "apiFormat": "responses", + "apiFormat": "openai_chat", "models": { "default": "mimo-v2.5-pro" }, @@ -132,7 +132,7 @@ "baseUrl": "https://token-plan-cn.xiaomimimo.com/v1", "docsUrl": "https://www.mimo-v2.com/zh/docs/quick-start/first-api-call", "authScheme": "bearer", - "apiFormat": "responses", + "apiFormat": "openai_chat", "baseUrlOptions": [ { "label": "中国集群",