feat(models): add Xiaomi MiMo API and Token Plan presets - #3186
Merged
Merged
Conversation
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 to the shared provider catalog so users can select its regular API or China Token Plan directly in model settings. Regular API presets cover OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages; Token Plan presets cover OpenAI and Anthropic.
Add curated MiMo model IDs and English, Simplified Chinese, and Traditional Chinese labels explaining that API and Token Plan keys are separate. Authenticate MiMo Anthropic requests with Bearer tokens, restricted to the official HTTPS origins and Anthropic paths.
Type and Areas
Type: Feature
Areas: Shared provider catalog, model settings localization, AI adapters
Motivation / Impact
Users no longer need to manually assemble MiMo endpoints and protocol settings. The Responses preset uses the complete request URL, supported by the existing URL resolver, so the URL-based preset picker can distinguish it from Chat Completions. Trusted URL validation now distinguishes protocols within a provider while still rejecting duplicate protocol bindings and ownership by another provider. No persisted configuration schema or wire protocol changes are needed.
References: Token Plan quick access, OpenAI API, Anthropic API.
Verification
Final CI run passed on
a6e6fef11feab60c8342c61bdbc8ce84ae3776de: 11 successful PR checks, including frontend and Rust/CLI across macOS, Linux, and Windows; 2 impact-selected jobs skipped.cargo test -p openbitfun-core --no-default-features --features ai-adapter-runtime --lib infrastructure::ai::— 28 passed, covering provider overlay validation, protocol collisions, catalog fallback, and reasoning catalog behavior.cargo test -p openbitfun-ai-adapters --lib providers::anthropic::request::tests— 6 passed, including MiMo message/discovery authentication and lookalike-origin rejection.cargo test -p openbitfun-config-contracts --lib conversion::tests— 14 passed.pnpm --dir src/web-ui exec vitest run src/infrastructure/config/services/providerPresets.test.ts src/infrastructure/config/services/modelConfigs.test.ts— 15 passed.pnpm run i18n:audit— passed, zero warnings.pnpm run fmt:rsandgit diff --check— passed.The Web UI
test:runwrapper initially stopped in its design-system prebuild because this worktree lacked the token-engine dependency link. The focused Vitest suite above ran successfully using existing installed dependencies. The final CI subsequently passed the frontend build; no rendered UI verification was performed.Reviewer Notes
AI-assisted implementation and self-review; tested with focused local checks and the passing cross-platform CI suite. The first Linux CI run exposed a normalized-URL collision between MiMo Chat Completions and Responses. This is fixed with regression coverage; the provider-count assertions now include MiMo. No live MiMo API key was used. Remote workspace, remote control, Peer Device Mode, and Detached Dispatch were not exercised; shared catalog/adapter placement is not evidence of remote behavior. No data migration is required.
Checklist