debug messages_O
See what you're actually sending to ChatGPT
- messages
The advanced ChatGPT suite in this pack - load_openAI _O, Chat_Message _O, combine_chat_messages _O, Chat completion _O - lets you build a multi-turn conversation out of individual message nodes. Which is great, until the model answers something weird and you realize you can't see what you actually sent it. debug messages_O is the inspection node for that moment: feed it the message list and it dumps the whole thing to the console so you can read exactly what your graph assembled.
It's a small, honest tool with one job. Its full name in the README is "Debug OpenAI Chat Messages," and it sits in O/debug/OpenAI/Advanced/ChatGPT right next to its sibling debug Completeion _O (which dumps the model's full completion object instead). If you're doing anything clever with the advanced suite - building a system message, chaining two message lists with combine_chat_messages _O, mixing user and assistant turns - this is how you confirm the structure before it hits the API and costs you tokens on a malformed request.
How it works
It's a plain output node. You give it one input, the message list, and it prints it to stdout:
messages(OPENAI_CHAT_MESSAGES) - the message list object coming out ofChat_Message _Oorcombine_chat_messages _O.
When it runs, the source prints QualityOfLifeSuit_Omar92:OpenAIChatMEssages followed by the message list to the terminal that launched ComfyUI. There are no outputs and nothing is modified - it's a pure observer. The name in the code is DebugOpenAIChatMEssages_O, which should tell you something about the pack's QA standards, but the behaviour is solid: what you see in the console is the exact payload your Chat completion _O node will send.
The one practical habit that saves money: put this on the messages wire before the completion node, run once, and eyeball it. Multi-turn conversations built from separate message nodes are easy to get subtly wrong - two user messages where you meant a system message, or a role mismatch that makes the model ignore your instructions. Catching that before you pay for the API call is the whole point.
Where it fits
This is end-of-the-line debugging for one specific subsystem. It's not useful on its own - you need the advanced OpenAI chain installed, configured, and wired. And fair warning, that chain is the fiddly part of this pack. load_openAI _O requires a real API key typed into the widget, its default base_url points at a community Cloudflare-worker proxy rather than OpenAI's official endpoint, and the pack's own metadata admits it doesn't track the newest OpenAI API cleanly. So before you even get to debug, make sure a plain chat completion works. This node is for when the content is wrong, not when the connection is broken.
Installing it
It ships with the Quality of Life Suit pack (omar92/ComfyUI-QualityOfLifeSuit_Omar92). Install via ComfyUI Manager (search "Quality of Life Suit") or clone:
cd <ComfyUI>/custom_nodes
git clone https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92.git
Restart ComfyUI properly. The node itself needs nothing extra, though the OpenAI nodes around it will lazily pip install the openai package on first use. The pack's config.json also defaults autoUpdate to true, which is worth knowing if ComfyUI ever starts behaving differently between launches.
Common issues
- Nothing prints. Check the launch terminal, not the browser - all this pack's debug output goes to stdout.
- The input socket won't accept your wire. Make sure it's the
OPENAI_CHAT_MESSAGESoutput fromChat_Message _O/combine_chat_messages _O. If you're feeding it a plain STRING, wrong tool. - You see the messages and they're wrong. Good - that's the diagnostic working. Fix the message structure, then remove the debug node from the final workflow.
It's a boring node, but "boring observer that shows you the truth" is exactly the right tool when you're paying per API call to a model that keeps ignoring your instructions.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| messages | OPENAI_CHAT_MESSAGES | — |
Outputs (0)
No outputs