Nodes/ComfyUI Griptape Nodes/Griptape Prompt Driver: OpenAI Compatible
ComfyUI Node

Griptape Prompt Driver: OpenAI Compatible

The catch-all brain — any OpenAI-compatible endpoint, from GPT-4o to vLLM

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Prompt Driver: OpenAI Compatible
    • DRIVER
    modelgpt-4o
    max_attempts_on_fail2
    temperature0.10
    seed10342349342
    use_native_toolstrue
    max_tokens-1
    min_p0.10
    response_formatdefault
    api_key_env_varOPENAI_API_KEY
    base_urlhttps://api.openai.com/v1

    If there's one driver you should know by heart in this pack, it's the OpenAI-compatible one. OpenAI's API format has become the lingua franca of LLM serving - nearly every provider and local server speaks it, whether it's OpenAI itself, a vLLM or llama.cpp server on your own box, a third-party reseller, or a local runner with an OpenAI-compatible mode. This driver points a Griptape agent at any of them. base_url is the only thing that changes. It's the Swiss Army knife, and if you're unsure which driver a setup needs, this one usually just works.

    It's also the closest thing to a plain "OpenAI" driver in this list - the default base_url is https://api.openai.com/v1 with the OPENAI_API_KEY env var, so for most people it is the OpenAI driver, just one that can point anywhere else too.

    The inputs that matter

    • base_url - the whole ballgame. Default https://api.openai.com/v1; swap in any OpenAI-compatible endpoint. Want your own vLLM box? http://127.0.0.1:8000/v1. Reseller or proxy? Their base URL. This one field is why the driver exists.
    • model - free-text, default gpt-4o. Whatever the endpoint serves - a GPT model on OpenAI, a Llama model on vLLM.
    • api_key_env_var - env-var name, default OPENAI_API_KEY. For local servers that don't need auth, you can point this at any variable name (or a dummy) - most local OpenAI-compatible servers ignore the key anyway.
    • response_format - default or json_object; handy when the agent's output must parse cleanly.

    Standard temperature, seed, min_p, max_tokens, use_native_tools, max_attempts_on_fail included. Output: DRIVER.

    When to use this instead of a dedicated driver

    The rule of thumb: use the named driver when the provider is one of the big ones with its own quirks (Bedrock's required max_tokens, Azure's deployment names, Anthropic's native tooling). Use OpenAI-compatible when you're talking to anything else - which today is a huge category: local servers, proxies, resellers, self-hosted inference, and half the "GPU rental" services. It's also the escape hatch if a named driver's dropdown goes stale: a model retired from a dropdown is still reachable here as free text.

    Installing it

    Pack install: ComfyUI Manager → GriptapeComfyUI-Griptape, restart, or

    cd ComfyUI/custom_nodes
    git clone https://github.com/griptape-ai/ComfyUI-Griptape
    

    Set OPENAI_API_KEY (or your endpoint's key) in Settings → Griptape or your environment.

    Common issues

    The classic miss: forgetting the /v1 suffix on a local server's base URL, or trailing-slash mismatches - many local servers 404 without it. Also, "compatible" isn't always a promise: older llama.cpp and some proxies implement a subset of the OpenAI API, and exotic features (vision, tool calling) may silently not work - that's the endpoint, not the node. And the pack-wide torch/version gotchas apply: reinstall torch with the cu121 wheels if ComfyUI breaks, python -m pip install griptape -U for stale-library import errors.

    CategoryGriptape/Agent Drivers/Prompt

    Inputs (10)

    NameTypeDefaultDescription
    modeloptSTRINGgpt-4oThe model to use, e.g., gpt-4o
    max_attempts_on_failoptINT21–100Maximum attempts on failure
    temperatureoptFLOAT0.100–1Temperature for sampling
    seedoptINT10342349342Seed for random number generation
    use_native_toolsoptBOOLEANtrueUse native tools for the LLM.
    max_tokensoptINT-1Maximum tokens to generate. If <=0, it will use the default based on the tokenizer.
    min_poptFLOAT0.100–1Minimum probability for sampling. Lower values will be more random.
    response_formatoptCOMBOdefaultFormat of the response
    api_key_env_varoptSTRINGOPENAI_API_KEYEnter the environment variable name, not the actual API key
    base_urloptSTRINGhttps://api.openai.com/v1The base URL for the OpenAI API

    Outputs (1)

    NameTypeDescription
    DRIVERPROMPT_DRIVER