Commit 8723601
authored
fix(gateway): expose MiMo model variants to OpenCode clients (#1644)
## Summary
- Xiaomi MiMo models (`xiaomi/mimo-v2-pro:free` and
`xiaomi/mimo-v2-omni:free`) were missing `opencode.variants`
configuration, causing OpenCode clients on Kilo Gateway to not properly
recognize or surface these reasoning models.
- Added `isXiaomiModel` to the variant detection in `getModelVariants()`
so MiMo models now expose `instant` (reasoning disabled) and `thinking`
(reasoning enabled) variants, matching the pattern used by other
reasoning models like Moonshot and ZAI.
- Updated the approved test snapshot to reflect the new opencode variant
settings for both MiMo models.
Closes #1641
## Verification
- [x] `pnpm typecheck` — passed, no errors
- [x] Manual review of `getOpenCodeSettings()` flow confirms MiMo models
now return `{ variants: { instant: ..., thinking: ... } }` instead of
`{}`
## Visual Changes
N/A
## Reviewer Notes
- The fix adds `isXiaomiModel(model)` to the existing
`isMoonshotModel(model) || isZaiModel(model)` branch in
`getModelVariants()` (`src/lib/providers/model-settings.ts:66`), giving
MiMo models the same `instant`/`thinking` variant structure as other
reasoning-capable models.
- Both MiMo models were already registered in `kiloFreeModels` with
`status: 'public'` and the `'reasoning'` flag — the only missing piece
was the opencode variant configuration that tells clients how to toggle
reasoning.File tree
2 files changed
+30
-3
lines changed- src
- lib/providers
- tests
2 files changed
+30
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | | - | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
193 | 206 | | |
194 | 207 | | |
195 | 208 | | |
| |||
644 | 657 | | |
645 | 658 | | |
646 | 659 | | |
647 | | - | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
648 | 674 | | |
649 | 675 | | |
650 | 676 | | |
| |||
0 commit comments