OpenAI ChatGPT Advanced Options
Truncation, token budget, and instructions
- OPENAI_CHAT_CONFIG
This is a config packet, not a call. OpenAI ChatGPT Advanced Options doesn't talk to any API on its own - it packages three settings into an OPENAI_CHAT_CONFIG object that you feed into the advanced_options input of the OpenAI ChatGPT node. You reach for it when the default chat node isn't enough: your responses are getting cut off, you want the model to always follow a standing instruction, or you need to decide what happens when context runs out.
What the three knobs actually do
-
truncation- the interesting one.auto(the default) means that if the response plus your context exceeds the model's window, the API silently drops input items from the middle of the conversation to make room.disabledmeans no such mercy: a request that would overflow just fails with a 400 error. For one-shot callsautois almost always right. If you're building something where silently losing context would corrupt the result,disabledat least fails loudly. -
max_output_tokens- an upper bound on the response, including visible output tokens. Range 16 to 16384, default 4096. This is the fix for truncated answers: if your model stops mid-thought, raise it. -
instructions- model-level guidance on how to generate the response. It's not a chat message; it's standing direction layered on top of the whole request, the closest this node gets to a system prompt.
The output is OPENAI_CHAT_CONFIG, wired into OpenAIChatNode's advanced_options socket. That's the whole loop: build config here, spend it there.
The trap in the design
Notice what's not here: no temperature, no top_p. That's deliberate - OpenAI's reasoning models like o4-mini don't support them, and rather than expose controls that work on some models and get ignored or rejected on others, the node just leaves them out. So if you were hoping to tune randomness, this isn't the place. That's a feature of the design, not a missing feature.
Getting it and what to watch
It ships with ComfyUI core - the OpenAI partner nodes have been in since May 2025, nothing to install. It's a pure local struct, so it costs nothing and needs no account by itself; the bill only happens when the chat node actually runs, through your Comfy credits.
The practical gotcha: max_output_tokens is a hard-ish cap and counts only output, not your file context. If you're feeding big files via OpenAI Chat Input Files, the tokens those files eat can push the whole request past the window - that's when truncation starts quietly editing your context for you. Set disabled if you'd rather know than guess.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| truncation | COMBO | auto | The truncation strategy to use for the model response. auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation.disabled: If a model response will exceed the context window size for a model, the request will fail with a 400 error |
| max_output_tokensopt | INT | 409616–16384 | An upper bound for the number of tokens that can be generated for a response, including visible output tokens |
| instructionsopt | STRING | Instructions for the model on how to generate the response |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| OPENAI_CHAT_CONFIG | OPENAI_CHAT_CONFIG | — |