Comfy-Org/ComfyUI · error · ValueError

Model refused to respond: {message.refusal}

Error message

Model refused to respond: {message.refusal}

What it means

Error "Model refused to respond: {message.refusal}" thrown in Comfy-Org/ComfyUI.

Source

Thrown at comfy_api_nodes/nodes_openrouter.py:264

        raise ValueError(f"OpenRouter error ({code}): {response.error.message or 'no message'}")
    if not response.choices:
        raise ValueError("Empty response from OpenRouter (no choices).")
    message = response.choices[0].message
    if not message:
        raise ValueError("Empty response from OpenRouter (no message).")
    if message.refusal:
        raise ValueError(f"Model refused to respond: {message.refusal}")
    return message.content or ""

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Rephrase the prompt; the model refused to respond.

When it happens

Trigger: Thrown at comfy_api_nodes/nodes_openrouter.py:264 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/e88d0879ad052fa5. Report an issue: GitHub.