Comfy-Org/ComfyUI · error · ValueError

Empty response from OpenRouter (no choices).

Error message

Empty response from OpenRouter (no choices).

What it means

Error "Empty response from OpenRouter (no choices)." thrown in Comfy-Org/ComfyUI.

Source

Thrown at comfy_api_nodes/nodes_openrouter.py:259


def _extract_text(response: OpenRouterChatResponse) -> str:
    if response.error:
        code = response.error.code if response.error.code is not None else "unknown"
        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).")

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Retry the request; OpenRouter returned no choices.

When it happens

Trigger: Thrown at comfy_api_nodes/nodes_openrouter.py:259 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/f460fcbed7442dcf. Report an issue: GitHub.