Skip to content

feat: add Xiaomi MiMo provider support#3012

Open
felipebrgs1 wants to merge 2 commits intotailcallhq:mainfrom
felipebrgs1:feat/add-xiaomi-mimo-provider
Open

feat: add Xiaomi MiMo provider support#3012
felipebrgs1 wants to merge 2 commits intotailcallhq:mainfrom
felipebrgs1:feat/add-xiaomi-mimo-provider

Conversation

@felipebrgs1
Copy link
Copy Markdown

Summary

Add Xiaomi MiMo as a new AI provider with support for MiMo V2 Pro, V2 Omni, and V2 TTS models.

Context

Xiaomi MiMo is a new AI provider offering high-performance models with competitive capabilities. Adding this provider expands the available AI options for users, particularly for those in Asia-Pacific regions with dedicated cluster endpoints.

Changes

  • Added XIAOMI_MIMO provider constant to ProviderId enum
  • Included Xiaomi MiMo in built-in providers list
  • Added display name mapping for "xiaomi_mimo" -> "XiaomiMimo"
  • Added parser support for "xiaomi_mimo" string
  • Added provider configuration with 3 models:
    • MiMo V2 Pro: 1T+ parameters, 1M context length, supports tools and reasoning
    • MiMo V2 Omni: Multi-modal (text + image), 262K context, supports tools and reasoning
    • MiMo V2 TTS: Text-to-speech model, 8K context
  • Configured multi-region API endpoints (Singapore, China, Amsterdam)
  • Added unit tests for provider parsing, display name, and built-in list inclusion

Key Implementation Details

  • API key configured via XIAOMI_MIMO_API_KEY environment variable
  • Dynamic cluster URL selection via CLUSTER parameter (defaults to Singapore)
  • Response type compatible with OpenAI format
  • Models support parallel tool calls and reasoning where applicable

Use Cases

  • Users can now select Xiaomi MiMo models for AI-assisted coding tasks
  • Multi-modal support via MiMo V2 Omni for image-based workflows
  • Text-to-speech capabilities via MiMo V2 TTS for audio output
  • Regional endpoint selection for improved latency in Asia-Pacific

Testing

# Run provider tests
cargo test -p forge_domain provider::tests

# Run all tests to verify no regressions
cargo test

Links

Add Xiaomi MiMo as a new AI provider with support for:
- MiMo V2 Pro (1T+ params, 1M context)
- MiMo V2 Omni (multi-modal)
- MiMo V2 TTS

Includes provider configuration, API endpoints, and tests.
Copilot AI review requested due to automatic review settings April 14, 2026 18:36
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 14, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added type: feature Brand new functionality, features, pages, workflows, endpoints, etc. update: provider Updates provider.json configuration. labels Apr 14, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Xiaomi MiMo as a new built-in AI provider, enabling users to select MiMo V2 Pro / Omni / TTS models via Forge’s provider abstraction.

Changes:

  • Added xiaomi_mimo provider entry to the embedded provider registry (endpoints + 3 hardcoded models).
  • Extended ProviderId with XIAOMI_MIMO, including built-in list inclusion, display-name mapping, and FromStr parsing.
  • Added unit tests covering parsing, display name, and built-in provider inclusion.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
crates/forge_repo/src/provider/provider.json Registers the xiaomi_mimo provider, its endpoint templating, and hardcoded model metadata.
crates/forge_domain/src/provider.rs Adds XIAOMI_MIMO to ProviderId (constants, display name, parsing) and unit tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3255 to +3260
"description": "Xiaomi's omni-modal model that natively processes image, video, and audio inputs",
"context_length": 262100,
"tools_supported": true,
"supports_parallel_tool_calls": true,
"supports_reasoning": true,
"input_modalities": ["text", "image"]
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Model mimo-v2-omni is declared with input_modalities of ["text", "image"], but its description claims it natively processes "image, video, and audio". This is misleading for users and inconsistent with the declared capabilities; either update the description to match the supported modalities or extend input_modalities if video/audio are actually supported by the rest of the stack.

Copilot uses AI. Check for mistakes.
Comment on lines +3236 to +3238
"url_param_vars": [
{ "name": "CLUSTER", "options": ["token-plan-sgp.xiaomimimo.com", "token-plan-cn.xiaomimimo.com", "token-plan-ams.xiaomimimo.com"] }
],
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url_param_vars includes CLUSTER, which makes CLUSTER mandatory when creating credentials from environment variables (see provider_repo reading all url_param_vars and erroring if any are missing). That conflicts with the template’s {{else}} token-plan-sgp... default and the PR description (“defaults to Singapore”). Consider making CLUSTER optional (e.g., remove it from url_param_vars and hardcode the default URL), or adjust credential/env handling so missing CLUSTER doesn’t block configuration while still allowing UI selection.

Suggested change
"url_param_vars": [
{ "name": "CLUSTER", "options": ["token-plan-sgp.xiaomimimo.com", "token-plan-cn.xiaomimimo.com", "token-plan-ams.xiaomimimo.com"] }
],
"url_param_vars": [],

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc. update: provider Updates provider.json configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants