Skip to content

feat(models): add Xiaomi MiMo API and Token Plan presets - #3186

Merged
bobleer merged 2 commits into
GCWing:mainfrom
bobleer:bob/add-xiaomi-mimo-provider
Sep 22, 2026
Merged

bobleer merged 2 commits into
GCWing:mainfrom
bobleer:bob/add-xiaomi-mimo-provider

Conversation

@bobleer

@bobleer bobleer commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

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:rs and git diff --check — passed.

The Web UI test:run wrapper 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

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@bobleer
bobleer merged commit 178e9b5 into GCWing:main Sep 22, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant