External LLM Prompt:
External LLM Prompt sends a request to a configured external language model and returns its written reply for use in a ComfyUI workflow. It can help you develop an idea into a more detailed art prompt, rewrite descriptions, or generate text for a later step in your workflow. The node uses the external service configured for the extension; the model you can select depends on that configuration and its cached model list. The supplied code shows how the node passes requests to the service, but does not establish that every model supports every setting or image-based request.
External LLM Prompt Input Parameters:
model
Selects the external language model that receives your request. This is a required dropdown, and its available choices come from the configured endpoint's cached model list rather than a fixed list in the node. The default is the first available choice, so both the choices and default can differ between installations or configurations. Choosing a different model may change the reply, but the supplied code does not establish the capabilities of any particular model. No fixed minimum or maximum applies.
system_prompt
Provides instructions that frame how the model should respond, such as “Write concise visual descriptions suitable for image prompts.” This is a required, single-line text field with a default of an empty string. Use it for guidance you want to keep consistent while changing the individual task. The node passes the text to the external service; the supplied code does not specify how a particular model prioritizes it. No minimum or maximum length is declared in the interface.
user_prompt
Provides the request you want the model to answer, such as “Describe a rain-soaked street scene with clear lighting and composition details.” This is a required, single-line text field with a default of an empty string. More specific wording gives the model a clearer task and makes the resulting text easier to use in an art workflow. The supplied interface declares no minimum or maximum length, and the code does not establish what an empty request would produce.
max_tokens
Sets the requested maximum number of tokens for the generated response. Tokens are pieces of text rather than words, so this is not an exact word-count control. A lower value can be useful for short prompt rewrites; a higher value gives the model more room for detailed descriptions. This required integer has a default of 1024, a minimum of 1, a maximum of 32768, and a step of 1. The code passes the value to the external service, but does not establish whether every endpoint accepts the full range or how it enforces the limit.
reasoning_effort
Selects the reasoning-effort setting passed to the external service. The available options are default, high, medium, low, and off; the default is default. You can leave it at default unless you have a reason to request another level. This is a choice list, so a numeric minimum or maximum does not apply. The supplied code does not establish how each setting affects speed, cost, or response quality on a given model, or whether every model supports every option.
image
Optionally supplies an image alongside your text request. This can be useful when you want to ask about a visual reference, but you should select a model and endpoint that support image requests. The input type is IMAGE; it is not required, and its default is effectively no image connected. No size, resolution, or count limits are specified in the supplied interface. The code shows that the image is passed to the service, but does not show how that service processes it.
External LLM Prompt Output Parameters:
response
The node's sole output is a STRING containing the external language model's assistant reply. You can read it as the text answer to your request or connect it to another node that accepts text. For example, a request to expand a short scene idea may produce a longer description you can review before using elsewhere. The output is text, not an image or a structured set of prompt fields; its exact wording depends on the selected model and request.
External LLM Prompt Usage Tips:
- Put reusable direction in
system_promptand the current art task inuser_prompt. For example, keep “Use concrete visual details” as standing guidance, then change the scene description for each run. - Start with the default
max_tokensvalue of1024. Lower it when you need a brief result, or raise it when a detailed description is being cut short; stay within the declared range of1to32768. - Leave
reasoning_effortatdefaultinitially. Test another listed option only when your selected model supports it, and compare the results for your particular task rather than assuming a setting will always improve them. - Connect
imageonly when your request needs a visual reference. If an image-based request fails, first check whether the selected model and configured endpoint accept images. - If the model you expect is missing from the dropdown, check the configured endpoint and its cached model list. The dropdown is populated from those choices, not from a fixed catalog in this node.
External LLM Prompt Common Errors and Solutions:
No models available in the model dropdown
- Explanation: The dropdown is built from the configured service's model choices. The supplied code does not specify the exact message shown when that list is empty.
- Solution: Check the extension's external endpoint configuration and whether its model list has been populated or refreshed. Then reopen the node and check the choices again.
Selected model is unavailable
- Explanation: A saved workflow may refer to a model that is no longer present in the current choices, or the endpoint may no longer make it available. The supplied code does not provide a verbatim error message for this condition.
- Solution: Select a model currently shown in the dropdown. If the expected model is absent, check the configured endpoint and cached model list.
max_tokens is outside the allowed range
- Explanation: The node declares an integer range of
1through32768. A value outside that range does not match its input specification; the exact validation message depends on the host. - Solution: Set
max_tokensto a whole number within the declared range. Use a smaller value for concise replies.
reasoning_effort value is not accepted
- Explanation: The node offers only
default,high,medium,low, andoff. A model or endpoint may also reject a listed setting, although that behavior is not shown in the supplied implementation. - Solution: Choose one of the listed values. If a request fails with a particular value, retry with
defaultand check what the selected model supports.
Image request is not supported
- Explanation: The node can pass an optional
IMAGEto the service, but the supplied code does not establish that every selected model or endpoint can process one. No exact error string is provided. - Solution: Try the request without
imageto isolate the issue, or choose a model and endpoint known to support image requests.
External request fails or returns no usable response
- Explanation: The node delegates generation to an external service. The supplied class does not show the service's network, authentication, timeout, or response-handling errors, so no specific message can be quoted reliably.
- Solution: Check that the extension's external service is configured and reachable, then retry a short text-only request with an available model. Consult the service or ComfyUI logs for the actual error before changing further settings.
