fix(xiaomi): address review findings — remove speculative models, add… · openclaw/openclaw@795ad84
jimdawdy-hub
·
2026-05-15
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -197,12 +197,10 @@ describe("xiaomi provider plugin", () => {
|
197 | 197 | const modelIds = catalogProvider.models?.map((m) => m.id); |
198 | 198 | expect(modelIds).toContain("mimo-v2-pro"); |
199 | 199 | expect(modelIds).toContain("mimo-v2-omni"); |
200 | | -expect(modelIds).toContain("mimo-v2.5"); |
201 | | -expect(modelIds).toContain("mimo-v2.5-pro"); |
202 | 200 | expect(modelIds).toContain("mimo-v2-flash"); |
203 | 201 | |
204 | 202 | expect(catalogProvider.models?.find((m) => m.id === "mimo-v2-pro")?.reasoning).toBe(true); |
205 | | -expect(catalogProvider.models?.find((m) => m.id === "mimo-v2.5-pro")?.reasoning).toBe(true); |
| 203 | +expect(catalogProvider.models?.find((m) => m.id === "mimo-v2-omni")?.reasoning).toBe(true); |
206 | 204 | expect(catalogProvider.models?.find((m) => m.id === "mimo-v2-flash")?.reasoning).toBeFalsy(); |
207 | 205 | }); |
208 | 206 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -51,47 +51,6 @@
|
51 | 51 | "cacheRead": 0, |
52 | 52 | "cacheWrite": 0 |
53 | 53 | } |
54 | | - }, |
55 | | - { |
56 | | -"id": "mimo-v2.5-flash", |
57 | | -"name": "Xiaomi MiMo V2.5 Flash", |
58 | | -"input": ["text"], |
59 | | -"contextWindow": 262144, |
60 | | -"maxTokens": 8192, |
61 | | -"cost": { |
62 | | -"input": 0, |
63 | | -"output": 0, |
64 | | -"cacheRead": 0, |
65 | | -"cacheWrite": 0 |
66 | | - } |
67 | | - }, |
68 | | - { |
69 | | -"id": "mimo-v2.5", |
70 | | -"name": "Xiaomi MiMo V2.5", |
71 | | -"input": ["text"], |
72 | | -"reasoning": true, |
73 | | -"contextWindow": 1048576, |
74 | | -"maxTokens": 32000, |
75 | | -"cost": { |
76 | | -"input": 0, |
77 | | -"output": 0, |
78 | | -"cacheRead": 0, |
79 | | -"cacheWrite": 0 |
80 | | - } |
81 | | - }, |
82 | | - { |
83 | | -"id": "mimo-v2.5-pro", |
84 | | -"name": "Xiaomi MiMo V2.5 Pro", |
85 | | -"input": ["text"], |
86 | | -"reasoning": true, |
87 | | -"contextWindow": 1048576, |
88 | | -"maxTokens": 32000, |
89 | | -"cost": { |
90 | | -"input": 0, |
91 | | -"output": 0, |
92 | | -"cacheRead": 0, |
93 | | -"cacheWrite": 0 |
94 | | - } |
95 | 54 | } |
96 | 55 | ] |
97 | 56 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -67,6 +67,7 @@ export function resolveOpenAICompletionsCompatDefaults(
|
67 | 67 | endpointClass === "mistral-public" || |
68 | 68 | endpointClass === "opencode-native" || |
69 | 69 | endpointClass === "xai-native" || |
| 70 | +isXiaomi || |
70 | 71 | isZai || |
71 | 72 | (isDefaultRoute && |
72 | 73 | isDefaultRouteProvider(input.provider, "cerebras", "chutes", "deepseek", "opencode", "xai")); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -355,6 +355,22 @@ describe("provider attribution", () => {
|
355 | 355 | endpointClass: "opencode-native", |
356 | 356 | hostname: "opencode.ai", |
357 | 357 | }); |
| 358 | +expectRecordFields(resolveProviderEndpoint("https://api.xiaomimimo.com/v1"), { |
| 359 | +endpointClass: "xiaomi-native", |
| 360 | +hostname: "api.xiaomimimo.com", |
| 361 | +}); |
| 362 | +expectRecordFields(resolveProviderEndpoint("https://token-plan-ams.xiaomimimo.com/v1"), { |
| 363 | +endpointClass: "xiaomi-native", |
| 364 | +hostname: "token-plan-ams.xiaomimimo.com", |
| 365 | +}); |
| 366 | +expectRecordFields(resolveProviderEndpoint("https://token-plan-cn.xiaomimimo.com/v1"), { |
| 367 | +endpointClass: "xiaomi-native", |
| 368 | +hostname: "token-plan-cn.xiaomimimo.com", |
| 369 | +}); |
| 370 | +expectRecordFields(resolveProviderEndpoint("https://token-plan-sgp.xiaomimimo.com/v1"), { |
| 371 | +endpointClass: "xiaomi-native", |
| 372 | +hostname: "token-plan-sgp.xiaomimimo.com", |
| 373 | +}); |
358 | 374 | }); |
359 | 375 | |
360 | 376 | it("treats OpenRouter-hosted Responses routes as explicit proxy-like endpoints", () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -682,6 +682,7 @@ export function resolveProviderRequestCapabilities(
|
682 | 682 | endpointClass === "azure-openai" || |
683 | 683 | endpointClass === "openrouter" || |
684 | 684 | endpointClass === "xai-native" || |
| 685 | +endpointClass === "xiaomi-native" || |
685 | 686 | endpointClass === "zai-native" || |
686 | 687 | endpointClass === "google-generative-ai" || |
687 | 688 | endpointClass === "google-vertex"; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。