Nodes/ComfyUI-Autogen/Autogen Model
ComfyUI Node

Autogen Model

The one node in this pack that needs your API key (there's no model file to download)

By strand1·Created 2 years ago·Updated 2 years ago· 3
Autogen Model
    • autogen_model
    model_namegpt-4o-mini
    base_urlhttps://api.openai.com/v1
    api_keyopenai_api_key
    visionFalse
    function_callingFalse
    json_outputFalse

    The name says "model," but there's no checkpoint, no safetensors, nothing to download. AutogenModel is the keyring for this whole pack: it builds the OpenAI-compatible model client that every other node in ComfyUI-Autogen runs on. You wire its autogen_model output into an Assistant Agent, that agent into a Group Chat, and suddenly you've got a multi-agent LLM pipeline living in your node graph. None of it starts until you put a real API key in this one node.

    How it works

    Under the hood it constructs an OpenAIChatCompletionClient from AutoGen's autogen_ext.models.openai. That's a remote model client, not a local one - it dials out over HTTP to whatever base_url you set. So this node is pure config: no weights, no VRAM, no HuggingFace download. The "MODEL" output type is the pack's own wire label, so don't try to plug a diffusion checkpoint into it; it's only meant to feed this pack's agent nodes.

    The inputs that matter

    You set exactly three things and the rest are toggles:

    • model_name - a dropdown with six presets: the GPT-4o family plus deepseek-chat and deepseek-coder. The DeepSeek entries are the tell that the author intends non-OpenAI providers here, not just OpenAI.
    • base_url - defaults to https://api.openai.com/v1. Point it anywhere that speaks the OpenAI protocol: a DeepSeek endpoint, or a local server like LM Studio or Ollama on its OpenAI-compat port. This is the one that lets you run the whole pack against a local LLM, which is what most people actually want from agent nodes.
    • api_key - here's the trap. The default value is the literal string openai_api_key, which is a placeholder, not a key. Paste a real one or every downstream call 401s. Note the key gets stored in the workflow JSON, and ComfyUI embeds that JSON in saved PNGs by convention - so a shared image can leak the key that's sitting in this node. Use a throwaway key or be careful what you share.

    Then there's vision, function_calling, and json_output, each a True/False toggle that sets the corresponding model_capabilities flag. Treat vision with suspicion: the README's own todo list says "vision models need integration," so the flag may be set before image input actually works end to end.

    Install

    Install the pack first - Manager (search "ComfyUI-Autogen"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/strand1/ComfyUI-Autogen
    cd ComfyUI-Autogen
    pip install -r requirements.txt   # autogen-core, autogen-ext[openai], autogen-agentchat
    

    Then restart ComfyUI. The pack lives under the "Autogen" category. No models download; the real cost is the AutoGen dependency stack, which is chunky but installs cleanly.

    Common issues

    The dominant failure is the placeholder key - if you're getting auth errors, that's it, and it's also the reason this node is where people bounce off the pack. Second is trying to reuse the MODEL wire with unrelated nodes; it only feeds the pack's own agents. And if you're switching providers, change base_url and the model_name together - the model string has to be valid for whatever endpoint you hit.

    A word of honesty: this pack is early and lightly maintained (one commit, early 2025, no real community footprint), so don't expect the polish of a big ecosystem pack. It's small enough to read the source in two minutes, which is worth doing anyway before you hand it an API key.

    CategoryAutogen

    Inputs (6)

    NameTypeDefaultDescription
    model_nameCOMBOgpt-4o-mini6 options: gpt-4o, gpt-4o-mini, chatgpt-4o-latest, gpt-3.5-turbo, deepseek-chat, deepseek-coder
    base_urlSTRINGhttps://api.openai.com/v1
    api_keySTRINGopenai_api_key
    visionCOMBOFalse2 options: True, False
    function_callingCOMBOFalse2 options: True, False
    json_outputCOMBOFalse2 options: True, False

    Outputs (1)

    NameTypeDescription
    autogen_modelMODEL