Skip to content

feat(xiaomi): add Xiaomi MiMo as first-class provider#7855

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-ec496c80
Apr 11, 2026
Merged

feat(xiaomi): add Xiaomi MiMo as first-class provider#7855
teknium1 merged 2 commits into
mainfrom
hermes/hermes-ec496c80

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Salvage of PR #7702 by @kshitijk4poor with follow-up modifications.

Adds Xiaomi MiMo as a first-class direct provider (via XIAOMI_API_KEY).

Models:

  • mimo-v2-pro — 1M context, text + reasoning + tool calling
  • mimo-v2-omni — 256K context, multimodal + reasoning + tool calling
  • mimo-v2-flash — 256K context, cheapest

Standard provider checklist (13 files):
auth.py, config.py, models.py, main.py, providers.py, doctor.py, model_normalize.py, model_metadata.py, models_dev.py, auxiliary_client.py, .env.example, cli-config.yaml.example

Follow-up modifications on top of #7702:

  • Added _PROVIDER_VISION_MODELS dict — vision tasks use mimo-v2-omni (multimodal) instead of the user's main model
  • Non-vision aux tasks use the user's selected model (default behavior)
  • On failure, falls back to aggregators (gemini flash) via existing fallback chain

Context length corrections (from official docs):

Model Before After
mimo-v2-pro 1,048,576 1,000,000
mimo-v2-omni 1,048,576 256,000
mimo-v2-flash (missing) 256,000

Tests

36 tests — registry, aliases, auto-detect, credentials, models.dev, normalization, URL mapping, providers module, doctor, aux client, vision model override, agent init.

Closes #7702

kshitijk4poor and others added 2 commits April 11, 2026 10:10
Cherry-picked from PR #7702 by kshitijk4poor.

Adds Xiaomi MiMo as a direct provider (XIAOMI_API_KEY) with models:
- mimo-v2-pro (1M context), mimo-v2-omni (256K, multimodal), mimo-v2-flash (256K, cheapest)

Standard OpenAI-compatible provider checklist: auth.py, config.py, models.py,
main.py, providers.py, doctor.py, model_normalize.py, model_metadata.py,
models_dev.py, auxiliary_client.py, .env.example, cli-config.yaml.example.

Follow-up: vision tasks use mimo-v2-omni (multimodal) instead of the user's
main model. Non-vision aux uses the user's selected model. Added
_PROVIDER_VISION_MODELS dict for provider-specific vision model overrides.
On failure, falls back to aggregators (gemini flash) via existing fallback chain.

Corrects pre-existing context lengths: mimo-v2-pro 1048576→1000000,
mimo-v2-omni 1048576→256000, adds mimo-v2-flash 256000.

36 tests covering registry, aliases, auto-detect, credentials, models.dev,
normalization, URL mapping, providers module, doctor, aux client, vision
model override, and agent init.
- environment-variables.md: XIAOMI_API_KEY, XIAOMI_BASE_URL, provider list
- cli-commands.md: --provider choices
- integrations/providers.md: provider table, Chinese providers section,
  config example, base URL list, choosing table, fallback providers list
- fallback-providers.md: supported providers table, auto-detection chain
- Fix XiaomiMiMo/MiMo-V2-Flash context length 32768 → 256000 (OpenRouter entry)
@teknium1 teknium1 force-pushed the hermes/hermes-ec496c80 branch from 40d6b3d to 55b77ba Compare April 11, 2026 18:15
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Supply Chain Risk Detected

This PR contains patterns commonly associated with supply chain attacks. This does not mean the PR is malicious — but these patterns require careful human review before merging.

⚠️ WARNING: base64 encoding/decoding detected

Base64 has legitimate uses (images, JWT, etc.) but is also commonly used to obfuscate malicious payloads. Verify the usage is appropriate.

Matches (first 20):

1471:+        image_base64 = base64.b64encode(image_data).decode("ascii")

Automated scan triggered by supply-chain-audit. If this is a false positive, a maintainer can approve after manual review.

@teknium1 teknium1 merged commit d4bb44d into main Apr 11, 2026
5 of 7 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.

2 participants