Nodes/ComfyUI OpenAI API/OpenAI API - Developer Role
ComfyUI Node

OpenAI API - Developer Role

The system prompt got renamed — this node handles o1

By hekmon·Created about a year ago·Updated 9 months ago· 46
OpenAI API - Developer Role
  • other_options
  • Options
instructions_rolefalse

Here's a genuinely annoying piece of API trivia that this pack's developer had to design around: with o1 models and newer, OpenAI renamed the system prompt role to developer. The behavior is the same - it's still the message that sets up how the model should behave - but older tools that hard-code the role as system either break outright or get their instructions silently ignored on those models. OAIAPI_DeveloperRole is a single switch that tells the pack to write your instructions message with the developer role instead of system. You turn it on when your model wants the new name.

How it works

It's the simplest option node in the pack: a boolean toggle, default off. Flipped on, it sets a use_developer_role flag in the OAIAPI_OPTIONS payload, and the Chat Completion node honors it in two places. First, when it builds the instructions message - a fresh system/developer prompt gets created with the right role. Second, and this is the clever bit, when you're feeding in conversation history: if the first message in the history is already a system or developer message, the node replaces it in place with the correct role instead of appending a duplicate. So you can chain turns and upgrade an old system-role conversation without it accumulating conflicting instructions.

The inputs and output

  • instructions_role - the one toggle. The widget literally labels the switch "system" off / "developer" on, so there's no guessing.
  • other_options (optional) - the usual chain point for other option nodes.
  • Output: Options (OAIAPI_OPTIONS), feeding the next option node or Chat Completion's options input.

Installing it

One of the ten nodes in comfyui-openai-api, so same pack install: ComfyUI Manager → search "OpenAI API" → install, or

cd ComfyUI/custom_nodes
git clone https://github.com/hekmon/comfyui-openai-api

restart after. Only openai as a new dependency; nothing to download.

Where people get burned

The reverse direction. If you're on a classic model like gpt-4o or a local server that still wants system, leave the switch off - most OpenAI-compatible servers (Ollama, vLLM) don't know or care about the developer role and can behave oddly if you force it. It's a compatibility switch, not a quality knob. The other trap: forgetting it exists, then wondering why an o1 model in your workflow seems to ignore your carefully written instructions. If you're running any of the newer "reasoning" OpenAI models, flip this on and your system_prompt starts actually landing. For a pack that's otherwise pure prompt-to-API plumbing, this node is the one that shows the author was thinking about where the ecosystem is going, not just where it's been.

CategoryOpenAI API/Options

Inputs (2)

NameTypeDefaultDescription
instructions_roleBOOLEANfalseSet this switch to true to set the instructions prompt role as 'developer' instead of 'system'
other_optionsoptOAIAPI_OPTIONSOthers options to merge with

Outputs (1)

NameTypeDescription
OptionsOAIAPI_OPTIONSMerged options to forward