Skip to content

Commit b84e035

Browse files
fix(gateway): expose MiMo model variants to OpenCode clients
Add Xiaomi MiMo models to the opencode variant configuration so that OpenCode users on Kilo Gateway can see and use MiMo Omni and MiMo Pro with instant/thinking reasoning variants. Closes #1641
1 parent b2a98e2 commit b84e035

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

src/lib/providers/model-settings.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { isMoonshotModel } from '@/lib/providers/moonshotai';
55
import { isOpenAiModel } from '@/lib/providers/openai';
66
import { qwen35_plus_free_model } from '@/lib/providers/qwen';
77
import { grok_code_fast_1_optimized_free_model } from '@/lib/providers/xai';
8+
import { isXiaomiModel } from '@/lib/providers/xiaomi';
89
import { isZaiModel } from '@/lib/providers/zai';
910
import type {
1011
CustomLlmProvider,
@@ -62,7 +63,7 @@ export function getModelVariants(model: string): OpenCodeSettings['variants'] {
6263
efforts.map(effort => [effort, { reasoning: { enabled: effort !== 'none', effort } }])
6364
);
6465
}
65-
if (isMoonshotModel(model) || isZaiModel(model)) {
66+
if (isMoonshotModel(model) || isZaiModel(model) || isXiaomiModel(model)) {
6667
return {
6768
instant: { reasoning: { enabled: false } },
6869
thinking: { reasoning: { enabled: true } },

src/tests/openrouter-models-sorting.approved.json

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,20 @@
189189
"default_parameters": {},
190190
"preferredIndex": 3,
191191
"isFree": true,
192-
"opencode": {}
192+
"opencode": {
193+
"variants": {
194+
"instant": {
195+
"reasoning": {
196+
"enabled": false
197+
}
198+
},
199+
"thinking": {
200+
"reasoning": {
201+
"enabled": true
202+
}
203+
}
204+
}
205+
}
193206
},
194207
{
195208
"id": "anthropic/claude-sonnet-4",
@@ -644,7 +657,20 @@
644657
],
645658
"default_parameters": {},
646659
"isFree": true,
647-
"opencode": {}
660+
"opencode": {
661+
"variants": {
662+
"instant": {
663+
"reasoning": {
664+
"enabled": false
665+
}
666+
},
667+
"thinking": {
668+
"reasoning": {
669+
"enabled": true
670+
}
671+
}
672+
}
673+
}
648674
},
649675
{
650676
"id": "x-ai/grok-code-fast-1:optimized:free",

0 commit comments

Comments
 (0)