Set ZhiPu Code LLM Service Connector (Token Plan) ๐
ComfyUI Node Guide
- llm_service_connector
Zhipu AI - now branded Z.ai internationally - is a genuinely bigger deal than its name recognition in image/video circles suggests. It spun out of Tsinghua's Knowledge Engineering Group back in 2019, IPO'd in Hong Kong in January 2026 as China's first publicly listed frontier AI company, and has been shipping the GLM model family under MIT license since July 2025, no revenue cap, no content restrictions. GLM-5.2, its current flagship, is a 744-billion-parameter mixture-of-experts model with a million-token context window. This connector node is your door into that lineup - specifically the Coding/Token Plan side of it, a flat-fee subscription tier (bigmodel.cn/glm-coding) rather than pay-per-token.
That distinction matters because ZhiPu actually offers two separate billing products, and this pack gives each one its own connector node with its own config slot. This one, SetZhiPuCodeLLMServiceConnector, reads the zhipu_code entry in your config file. Its sibling - not covered here - reads a plain zhipu entry for the standard pay-as-you-go Open Platform. Same company, same models, different subscription, different key. Get them crossed and you'll be hitting the wrong billing endpoint with the wrong credential, which usually just fails outright rather than silently overcharging you, but it's worth knowing which one you actually signed up for before you start debugging.
What it does. Nothing, by itself - same as every Set*LLMServiceConnector in ComfyUI-MieNodes. It packages your API key and model choice into an LLMServiceConnector object; the actual request happens downstream, in the pack's Translator node or a prompt generator.
Inputs that matter. api_token is your GLM Coding Plan key from bigmodel.cn/glm-coding. model_select gives you nine options, defaulting to glm-5.1: the current line (glm-5.2, glm-5.1, glm-5-turbo, glm-5), plus the previous generation (glm-4.7, glm-4.6, glm-4.5, glm-4.5-air - the smaller, cheaper member of that family). If ZhiPu ships something newer than this dropdown, Custom plus custom_model gets you there.
The config-file gotcha, 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 next to the README, deliberately not committed to git) and, if the zhipu_code entry there is filled in, uses that key over whatever you typed into the node's own api_token. This is the single most common gotcha across every connector here - a key you just entered on the node gets silently ignored because a different one already sits in the file. Fix the JSON, or set prefer_local_config to false to make the node's field authoritative. config_key lets you point at a different entry if you're running more than one ZhiPu account.
Install. Search "ComfyUI_MieNodes" in ComfyUI Manager, or clone https://github.com/MieMieeeee/ComfyUI-MieNodes into ComfyUI/custom_nodes and restart. No downloads for this node - it's API glue, not a local model.
Troubleshooting. Wrong-plan errors - a key that authenticates but returns billing or permission errors - almost always mean you're using an Open Platform key against the Coding Plan connector, or vice versa; check which product you actually signed up for on bigmodel.cn. Beyond that, the Coding Plan specifically is newer and less discussed outside China than ZhiPu's main Open Platform, so if you hit something unusual, ZhiPu's own documentation for the coding subscription will get you further than a general search - this particular product hasn't accumulated much English-language community troubleshooting yet.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| api_token | STRING | โ | |
| model_select | COMBO | glm-5.1 | 9 options: glm-5.2, glm-5.1, glm-5-turbo, glm-5, glm-4.7, glm-4.6, +3 |
| custom_modelopt | STRING | โ | |
| config_fileopt | STRING | mie_llm_keys.json | โ |
| config_keyopt | STRING | zhipu_code | โ |
| prefer_local_configopt | BOOLEAN | true | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| llm_service_connector | LLMServiceConnector | โ |