feat(byok): add Xiaomi Token Plan AMS and SGP direct BYOK providers#3492
Merged
Conversation
Adds two new direct BYOK providers for Xiaomi's MiMo Token Plan endpoints (Europe/Amsterdam and Singapore). Both regions expose the same MiMo model lineup, so the model definitions are shared between them. Metadata sourced from https://models.dev/api.json. The TTS model is omitted since it is audio-output only and not usable through chat completions.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryAll three commits reviewed: initial provider registration, models.dev sync refactor, and a cosmetic label update ( Files Reviewed (7 files)
Fix these issues in Kilo Cloud Reviewed by claude-4.6-sonnet-20260217 · 187,277 tokens Review guidance: REVIEW.md from base branch |
Replace the hardcoded MiMo model list with the standard `cachedEnhancedDirectByokModelList` + `modelsDevFetcher` flow used by zai-coding and ollama-cloud, so the catalog stays in sync with models.dev instead of drifting against an inline copy.
Mirror the Z.ai labelling so users can distinguish the existing pay-as-you-go Xiaomi BYOK option from the new Xiaomi Token Plan (AMS/SGP) providers.
markijbema
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
xiaomi-token-plan-ams(Europe) andxiaomi-token-plan-sgp(Singapore), both pointing at Xiaomi'stoken-plan-*.xiaomimimo.com/v1OpenAI-compatible endpoints.xiaomi-token-plan-models.ts. Metadata downloaded from https://models.dev/api.json. The TTS model is intentionally omitted because its output modality is audio and it is not usable through chat completions.DirectUserByokInferenceProviderIdSchema,UserByokTestModels, andDIRECT_BYOK_PROVIDERS_METAso the BYOK key manager UI surfaces them.Verification
Visual Changes
N/A — no UI surface changes beyond two extra entries in the existing BYOK provider dropdown sourced from
DIRECT_BYOK_PROVIDERS_META.Reviewer Notes
transformRequestis a no-op for these providers; we did not add a vendor-specificthinkingflag (unlikebyteplus-coding/kimi-coding) because Xiaomi's docs were not consulted to confirm that field. Reasoning is exposed viaREASONING_VARIANTS_BINARYso users can toggle on/off through the standard variant mechanism.imageinput modality (mimo-v2.5,mimo-v2-omni) are flaggedvision.mimo-v2.5andmimo-v2.5-proare flaggedrecommended.mimo-v2-flash.