Set MiMo Token Plan LLM Service Connector ๐
ComfyUI Node Guide
- llm_service_connector
Xiaomi's MiMo models ship through two separate connectors in this pack, and this is the one for the Token Plan - a fixed-fee subscription tier with its own base URL (token-plan-cn.xiaomimimo.com) and its own billing, distinct from the pay-per-token standard connector (SetMiMoLLMServiceConnector, not covered here). The model lineup is identical between the two; what changes is how you're billed and which key format you use. Standard-tier keys start sk-...; Token Plan keys start tp-.... Mix them up and the wrong connector will simply fail auth against the wrong endpoint, so this is worth double-checking before you go looking for anything more exotic.
Like every Set*LLMServiceConnector node here, it doesn't call anything itself - it packages your key and model choice into an LLMServiceConnector object that a downstream node, like the pack's Translator or a prompt generator, actually uses to make a request.
Inputs that matter. api_token is your Token Plan key. model_select gives you five real choices plus Custom: mimo-v2.5-pro (the default - MiMo's "deep thinking" tier, 1M token context, 128K output), mimo-v2.5 (Omni, full multimodal, same 1M context), mimo-v2-omni (Omni with a smaller 256K context), mimo-v2-flash (the cheap, fast option, also 256K context), and mimo-v2-pro (an older Pro revision). If you need a model outside that list, pick Custom and fill in custom_model.
What this node quietly protects you from. MiMo's API is OpenAI-compatible on the surface - it posts to /v1/chat/completions - but it has real edges the standard OpenAI schema doesn't warn you about. It wants max_completion_tokens instead of the legacy max_tokens, and it's likely to reject requests carrying top_k, n, or response_format, none of which appear anywhere in MiMo's own docs. This connector strips those fields before anything gets sent, and sets sane defaults (temperature=1.0, top_p=0.95) matching what MiMo actually expects. If you were hand-rolling a generic OpenAI-compatible call against MiMo yourself, this is exactly the kind of 400 error you'd hit and have to debug blind - here it's handled for you. It also sanitizes image inputs the same way the MiniMax connectors do: detail: "auto" gets dropped from any image_url content before sending (MiMo doesn't accept it), while an explicit low or high you set yourself passes through untouched.
The config-file precedence. prefer_local_config defaults to true - the node reads mie_llm_keys.json and uses the mimo_token_plan entry there over whatever's typed into the node's own api_token field. Same gotcha as every connector in this pack: if a key you just entered isn't taking effect, check the JSON file first. config_key lets you point at a different entry if you keep multiple MiMo accounts.
Install. Search "ComfyUI_MieNodes" in ComfyUI Manager, or clone https://github.com/MieMieeeee/ComfyUI-MieNodes into ComfyUI/custom_nodes and restart. No local downloads - this is API plumbing, not a model you host yourself.
Troubleshooting. If you're getting auth failures, confirm you're using a tp-... key here and not the sk-... key meant for the standard MiMo connector - that's the single most likely mistake given how similarly the two nodes are named and configured. Beyond that, this connector is newer and less-discussed than the mainstream Western providers, so if you hit something odd, Xiaomi's own Token Plan documentation will get you further than a general search.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| api_token | STRING | โ | |
| model_select | COMBO | mimo-v2.5-pro | 6 options: mimo-v2.5-pro, mimo-v2.5, mimo-v2-omni, mimo-v2-flash, mimo-v2-pro, Custom |
| custom_modelopt | STRING | โ | |
| config_fileopt | STRING | mie_llm_keys.json | โ |
| config_keyopt | STRING | mimo_token_plan | โ |
| prefer_local_configopt | BOOLEAN | true | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| llm_service_connector | LLMServiceConnector | โ |