Nodes/ComfyUI_MieNodes/Set Kimi LLM Service Connector ๐Ÿ‘
ComfyUI Node

Set Kimi LLM Service Connector ๐Ÿ‘

ComfyUI Node Guide

By MieMieeeeeยทCreated 2 years agoยทUpdated 25 days agoยท 225
Set Kimi LLM Service Connector ๐Ÿ‘
    • llm_service_connector
    โ—„api_tokenโ–บ
    โ—„model_selectkimi-k2.6โ–บ
    โ—„custom_modelโ–บ
    โ—„config_filemie_llm_keys.jsonโ–บ
    โ—„config_keykimiโ–บ
    โ—„prefer_local_configtrueโ–บ

    This node plugs ComfyUI into Kimi, the chat model line from Moonshot AI (ๆœˆไน‹ๆš—้ข). If the name "moonshot" in half the model IDs looks odd, that's the company, not a typo - Kimi is the product name, Moonshot is who builds it, and both show up in the dropdown because the model naming hasn't fully converged onto one scheme yet. Like every connector in ComfyUI-MieNodes, it doesn't generate text itself: it packages your API key and model choice into an LLMServiceConnector object that gets consumed by something else downstream - the pack's Translator node, or a prompt-rewriting node like BerniniPromptGenerator. Run it alone and you'll get an unused output; that's expected, not broken.

    Inputs that matter. api_token is your Moonshot platform key (sk-... format, from platform.moonshot.cn). model_select gives you 12 choices and it's worth reading them as two generations rather than one flat list. The older moonshot-v1-* line is named by context window - 8k, 32k, 128k - a naming convention from when context length was still the headline spec worth putting in the model ID, and each of those has a -vision-preview sibling for multimodal input. The newer line is kimi-k2.5 / kimi-k2.6 (the default), plus kimi-k2.7-code and a -highspeed variant of it aimed specifically at coding tasks rather than general chat. There's also moonshot-v1-auto, which picks a context tier automatically based on your input length rather than making you guess. If none of those twelve fit - Moonshot ships new models faster than any dropdown keeps up with - select Custom and put the exact model ID in custom_model.

    The config-file precedence, same as the rest of the pack. prefer_local_config defaults to true: the node reads mie_llm_keys.json (copied from mie_llm_keys.json.example, kept beside the README, intentionally not committed to git) and uses the kimi entry there ahead of whatever you typed into the node's own api_token field. This catches everyone at least once - you type a fresh key into the node, it keeps failing, and it turns out the stale key in the JSON file is what's actually being used. Fix the file, or set prefer_local_config to false if you'd rather the node's field always win. config_key lets you read a different entry from the same file if you're running more than one Moonshot account.

    Install. Search "ComfyUI_MieNodes" in ComfyUI Manager, or clone https://github.com/MieMieeeee/ComfyUI-MieNodes into ComfyUI/custom_nodes and restart. Nothing to download locally - this is API glue, not a model you run yourself.

    Troubleshooting. Beyond the config-file trap above, the coding-focused kimi-k2.7-code variants are a genuinely different product line from the general chat models - if you're using this connector for prompt rewriting or translation rather than code generation, the plain kimi-k2.6 default or a moonshot-v1-* model will usually serve you better than the code-tuned ones, which are optimized for a different kind of output entirely. And if a model in the dropdown starts erroring, treat it the same as any provider here: Moonshot's own catalog is the source of truth, and custom_model is your escape hatch when the node's list falls behind it. This particular provider doesn't have much written about it in the wider ComfyUI community yet, so when you hit something unusual, Moonshot's own API docs will get you further than a forum search will.

    Category๐Ÿ‘ MieNodes/๐Ÿ‘ LLM Service Config

    Inputs (6)

    NameTypeDefaultDescription
    api_tokenSTRINGโ€”
    model_selectCOMBOkimi-k2.612 options: kimi-k2.7-code, kimi-k2.7-code-highspeed, kimi-k2.6, kimi-k2.5, moonshot-v1-128k, moonshot-v1-128k-vision-preview, +6
    custom_modeloptSTRINGโ€”
    config_fileoptSTRINGmie_llm_keys.jsonโ€”
    config_keyoptSTRINGkimiโ€”
    prefer_local_configoptBOOLEANtrueโ€”

    Outputs (1)

    NameTypeDescription
    llm_service_connectorLLMServiceConnectorโ€”