feat(ai): add Xiaomi MiMo Token Plan support#578
Merged
Conversation
Summary: - Added Xiaomi MiMo Token Plan regional endpoints and expanded the MiMo model catalog. - Routed model verification through the unified LLM wrapper with thinking disabled. - Documented MiMo Token Plan setup and added provider/verification tests. Rationale: - Token Plan keys require Token Plan base URLs, and verify-model needs the provider-specific request wrapper to work reliably with OpenAI-compatible reasoning params. Tests: - pnpm vitest run tests/ai/xiaomi-provider.test.ts tests/api/verify-model.test.ts tests/ai/openai-provider.test.ts tests/server/provider-config.test.ts tests/ai/thinking-config.test.ts - pnpm test - pnpm check:i18n-keys - pnpm check - pnpm lint (0 errors, existing warnings only) - pnpm build - MiMo Token Plan smoke via getModel + callLLM against https://token-plan-cn.xiaomimimo.com/v1 with mimo-v2.5-pro returned MIMO_OK Co-authored-by: Codex <codex@openai.com>
wyuc
approved these changes
May 17, 2026
Contributor
wyuc
left a comment
There was a problem hiding this comment.
LGTM. Verified the model-metadata wiring and the verify-model refactor; also checked the settings UI locally (Token Plan chips + 5 models render fine, no component change).
No Token Plan key on my side, so no e2e against the real endpoints — relying on the author's smoke test + green CI.
Approving.
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
Add Xiaomi MiMo Token Plan support to the built-in Xiaomi provider and make the model connection check use the same unified LLM wrapper as normal generation.
Related Issues
N/A
Changes
mimo-v2-pro,mimo-v2-omni, andmimo-v2-flashalongside the existing V2.5 models./api/verify-modelto call throughcallLLMwith thinking disabled, so OpenAI-compatible provider request adapters are applied during connection tests..env.example,README.md, andREADME-zh.md, with locale labels for the new Base URL chips.Type of Change
Verification
Steps to reproduce / test
MIMO_API_KEY=tp-...,MIMO_BASE_URL=https://token-plan-cn.xiaomimimo.com/v1, andDEFAULT_MODEL=xiaomi:mimo-v2.5-pro.xiaomi:mimo-v2.5-pro.What I personally verified
pnpm vitest run tests/ai/xiaomi-provider.test.ts tests/api/verify-model.test.ts tests/ai/openai-provider.test.ts tests/server/provider-config.test.ts tests/ai/thinking-config.test.tspnpm testpnpm check:i18n-keyspnpm checkpnpm lintpnpm buildgetModel+callLLMagainsthttps://token-plan-cn.xiaomimimo.com/v1, usingmimo-v2.5-proand thinking disabled.text=MIMO_OK,inputTokens=263,outputTokens=4,reasoningTokens=0.Evidence
pnpm check && pnpm lint && npx tsc --noEmit)Checklist