Griptape Prompt Driver: OpenAI Compatible
The catch-all brain — any OpenAI-compatible endpoint, from GPT-4o to vLLM
- DRIVER
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. Defaulthttps://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, defaultgpt-4o. Whatever the endpoint serves - a GPT model on OpenAI, a Llama model on vLLM.api_key_env_var- env-var name, defaultOPENAI_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-defaultorjson_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 → Griptape → ComfyUI-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.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| modelopt | STRING | gpt-4o | The model to use, e.g., gpt-4o |
| max_attempts_on_failopt | INT | 21–100 | Maximum attempts on failure |
| temperatureopt | FLOAT | 0.100–1 | Temperature for sampling |
| seedopt | INT | 10342349342 | Seed for random number generation |
| use_native_toolsopt | BOOLEAN | true | Use native tools for the LLM. |
| max_tokensopt | INT | -1 | Maximum tokens to generate. If <=0, it will use the default based on the tokenizer. |
| min_popt | FLOAT | 0.100–1 | Minimum probability for sampling. Lower values will be more random. |
| response_formatopt | COMBO | default | Format of the response |
| api_key_env_varopt | STRING | OPENAI_API_KEY | Enter the environment variable name, not the actual API key |
| base_urlopt | STRING | https://api.openai.com/v1 | The base URL for the OpenAI API |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DRIVER | PROMPT_DRIVER | — |