Griptape Prompt Driver: Azure OpenAI
Talk to Azure OpenAI's GPT-4o — for people who need their LLM inside Azure
- DRIVER
Azure OpenAI is OpenAI's models wearing an enterprise suit: same GPT engines, but served through your Azure subscription with your data staying inside your tenant, which is a legal requirement in a lot of companies. This driver is the one you pick when your OpenAI access is behind Azure - either because your employer requires it or because you want the enterprise controls. If you have a normal OpenAI key, use the OpenAI-compatible driver instead; this one will just annoy you with extra fields.
The extra friction is real, and it's baked into how Azure works: you don't call "gpt-4o" by name, you call the deployment you created in the Azure portal, which is why the node insists on a deployment_name separate from the model.
How it works
The node builds a Griptape AzureOpenAiChatPromptDriver. It grabs your endpoint and key from environment variables, pairs them with the deployment you specify, and hands out the finished driver on its DRIVER output. Same as every prompt driver here: plug it into an agent config or RAG module and the agent starts talking to your Azure deployment.
The inputs that matter
deployment_name- this is the field that trips everyone up. It's the name of the deployment you created in the Azure portal (the "Deployments" page under your Azure OpenAI resource), not the model name. Defaultgpt-4oworks if your deployment is named that; otherwise this must match exactly or you get a "resource not found" error.model- dropdown ofgpt-4o,gpt-4,gpt-3.5-turbo-16k,gpt-3.5-turbo. Azure requires the model to be enabled in your region for a deployment to exist.endpoint_env_varandapi_key_env_var- env-var names, defaultsAZURE_OPENAI_ENDPOINTandAZURE_OPENAI_API_KEY. Both are required; a missing endpoint is the most common silent failure.response_format-defaultorjson_object. Switch tojson_objectwhen your agent output needs to be machine-parseable, like a tool result another node will read.
temperature, seed, max_tokens, max_attempts_on_fail, and use_native_tools are the standard knobs. Output is DRIVER.
Installing it
Same pack install as always: ComfyUI Manager → Griptape → ComfyUI-Griptape, or
cd ComfyUI/custom_nodes
git clone https://github.com/griptape-ai/ComfyUI-Griptape
restart, then set AZURE_OPENAI_ENDPOINT and AZURE_OPENAI_API_KEY in Settings → Griptape or your environment. The Azure docs link in the README walks through getting them.
Common issues
The deployment-name mismatch is the #1 trap - Azure returns a confusing "invalid resource" style error when the deployment doesn't exist, and people blame the node. Also check the endpoint value is the full resource URL (the one ending in openai.azure.com/) - truncating it breaks everything. And remember Azure, unlike OpenAI proper, requires you to have created a deployment for the exact model you select; you can't just type "gpt-4o" and have it appear.
If ComfyUI itself breaks after installing the pack, it's the usual griptape[all] torch clash - reinstall torch with the cu121 wheels and make sure griptape is current with python -m pip install griptape -U.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| modelopt | COMBO | gpt-4o | 4 options: gpt-4o, gpt-4, gpt-3.5-turbo-16k, gpt-3.5-turbo |
| 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. |
| deployment_nameopt | STRING | gpt-4o | — |
| response_formatopt | COMBO | default | 2 options: default, json_object |
| endpoint_env_varopt | STRING | AZURE_OPENAI_ENDPOINT | Enter the name of the environment variable for AZURE_OPENAI_ENDPOINT, not the actual endpoint. |
| api_key_env_varopt | STRING | AZURE_OPENAI_API_KEY | Enter the name of the environment variable for AZURE_OPENAI_API_KEY, not the actual API key. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DRIVER | PROMPT_DRIVER | — |