Nodes/ComfyUI_MieNodes/Set Bailian Token Plan LLM Service Connector ๐Ÿ‘
ComfyUI Node

Set Bailian Token Plan LLM Service Connector ๐Ÿ‘

The sk-sp- key that unlocks Qwen's whole multimodal lineup

By MieMieeeeeยทCreated 2 years agoยทUpdated about 21 hours agoยท 253
Set Bailian Token Plan LLM Service Connector ๐Ÿ‘
    • llm_service_connector
    โ—„api_tokenโ–บ
    โ—„model_selectqwen3-maxโ–บ
    โ—„custom_modelโ–บ
    โ—„config_filemie_llm_keys.jsonโ–บ
    โ—„config_keybailian_token_planโ–บ
    โ—„prefer_local_configtrueโ–บ

    This node does almost nothing, which is exactly why beginners get it wrong. SetBailianTokenPlanLLMServiceConnector holds an Alibaba Bailian subscription key and a model name, and outputs a single llm_service_connector object that every generating node in ComfyUI-MieNodes accepts. It doesn't generate text itself; it's the credential and the routing decision, bundled into a wire.

    Use it if you bought an ้˜ฟ้‡Œไบ‘็™พ็‚ผ Token Plan (the fixed-fee subscription, ๅฅ—้ค) and hold an sk-sp- key. That prefix matters more than anything else on this page: Bailian runs three isolated tiers, and the Token Plan is not the metered PAYG tier and not the Qwen-Coder-only Coding Plan. Keys are not interchangeable, and cross-use fails server-side - there's no automatic redirection, so a wrong pairing reads as a plain auth error and sends people hunting for a typo that isn't there.

    What you actually fill in

    • api_token - the sk-sp- key. You can leave this blank: the connector falls back to the bailian_token_plan entry in mie_llm_keys.json in the pack folder (copy the shipped .example file and fill it in once; it's gitignored, so nobody pastes keys into a shared workflow by accident).
    • model_select - default qwen3-max. The dropdown is the full multimodal lineup: qwen3-max, qwen3-plus, qwen3-flash, qwen3-turbo, qwen3-long for text, qwen3-vl-plus / qwen3-vl-flash for vision, qwen-image for image generation, and the qwen3-coder-* pair.
    • custom_model - paste a dated model id here (qwen3-max-2025-09-22-style) whenever you pick Custom, because vendored family names in a dropdown rot faster than the platform does.
    • config_file, config_key, prefer_local_config - the plumbing. config_key defaults to bailian_token_plan; prefer_local_config: true (the default) means the JSON file wins when it has a non-empty entry, so a stale key typed into the node won't quietly override your config file. Flip it to false when you keep a placeholder in the file and want to override per workflow.

    The one output is llm_service_connector, wired into any of the pack's consumer nodes - CallLLMService, Translator, the prompt generators, the H3 storyboard and loop nodes, CheckLLMServiceConnectivity. That last one is the ten-second sanity check: it sends a trivial prompt and shows you the HTTP status and the first chunk of the response, which is how you tell a wrong-tier key apart from a wrong model before burning a real run.

    Why the Token Plan is the interesting tier

    It's the subscription that covers the whole Bailian catalogue on one endpoint - text, vision, image and audio in one bill - which is why it's the sane default pick for this pack rather than the PAYG key. The pack's nodes lean on instruction-following and multimodal input far more than on code: the H3 plan pipeline wants a model that reads a cast list and a dialogue block and writes structured prompts back, chapter-and-verse. That is not a coder-model job.

    Practical fit note: the H3 nodes and the captioning/describe-style paths in this pack accept images, and on this node those go in as image content parts to a vision model - pick a qwen3-vl-* entry if you want the model to actually look at what it's rewriting about, because a text-only qwen3-max won't.

    Install

    The connector is part of the pack, so:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MieMieeeee/ComfyUI-MieNodes
    cd ComfyUI-MieNodes && pip install -r requirements.txt
    

    If you already have the pack, skip both - Manager search is ComfyUI_MieNodes, and there's no model to download and no GPU work involved. Then either type your key into api_token or, better, drop it into mie_llm_keys.json next to the README:

    {
      "bailian_token_plan": "sk-sp-your-key-here"
    }
    

    Where people get burned

    • Wrong tier, and it looks like a bad key. 001-style 401s on an sk-sp- key usually mean you pasted it into the PAYG connector (or the Coding Plan one). Check the prefix before you check the key.
    • Reasoning-adjacent models returning empty content. qwen3-* thinking-capable entries will spend tokens on their chain-of-thought, and downstream nodes cap tokens per call. If a node returns nothing at all, that's the first thing to look at - not the connector.
    • Key hygiene. A key typed into api_token lives inside your workflow JSON, and workflows get shared. That's the whole reason the pack ships a config file instead. Anyone on the fence: don't paste subscription keys into files you post.
    • Assuming the whole catalogue is text. qwen-image is an image-generation model id; asking it to write you a storyboard is a mismatch that surfaces as a confusing server error.
    Category๐Ÿ‘ MieNodes/๐Ÿ‘ LLM Service Config

    Inputs (6)

    NameTypeDefaultDescription
    api_tokenSTRINGโ€”
    model_selectCOMBOqwen3-max11 options: qwen3-max, qwen3-plus, qwen3-flash, qwen3-turbo, qwen3-long, qwen3-vl-plus, +5
    custom_modeloptSTRINGโ€”
    config_fileoptSTRINGmie_llm_keys.jsonโ€”
    config_keyoptSTRINGbailian_token_planโ€”
    prefer_local_configoptBOOLEANtrueโ€”

    Outputs (1)

    NameTypeDescription
    llm_service_connectorLLMServiceConnectorโ€”