Comfy-Org/ComfyUI · error · ValueError
Gemini interaction did not complete (status: {interaction.st
Error message
Gemini interaction did not complete (status: {interaction.status}). What it means
After a Gemini Interactions API call returns, the node requires interaction.status == 'completed'. Any other status (e.g. 'failed', 'cancelled', or an in-progress state) raises this error, appending the model's text output when present so the failure reason is visible. This is a post-response check — the request itself succeeded at the transport level but the interaction did not finish generating.
Source
Thrown at comfy_api_nodes/nodes_gemini.py:1689
)
parts.extend(to_interaction_media_part(p) for p in media_parts)
parts.append(GeminiInteractionTextPart(text=prompt))
interaction = await sync_op(
cls,
ApiEndpoint(path=GEMINI_INTERACTIONS_ENDPOINT, method="POST"),
data=GeminiInteractionRequest(
model=model_id,
input=parts,
generation_config=GeminiInteractionGenerationConfig(
temperature=model.get("temperature", 1.0),
top_p=model.get("top_p", 0.95),
),
),
response_model=GeminiInteraction,
)
if interaction.status != "completed":
model_message = get_text_from_interaction(interaction).strip()
raise ValueError(
f"Gemini interaction did not complete (status: {interaction.status})."
+ (f" Model response: {model_message}" if model_message else "")
)
return IO.NodeOutput(
await get_video_from_interaction(interaction, cls=cls),
get_text_from_interaction(interaction),
)
class GeminiExtension(ComfyExtension):
@override
async def get_node_list(self) -> list[type[IO.ComfyNode]]:
return [
GeminiNode,
GeminiNodeV2,
GeminiImage,
GeminiImage2,
GeminiNanoBanana2,View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Read the appended 'Model response:' text, when present, for the concrete failure reason.
- Retry the interaction — non-completed statuses are often transient.
- Reduce generation complexity: shorter duration, fewer inputs, simpler prompt.
- If persistent, check the Gemini API status page / try a different omni model id.
Example fix
// before
interaction = await gemini_interactions_generate(...)
video = await get_video_from_interaction(interaction, cls=cls) # raises: did not complete (status: failed)
// after
interaction = await gemini_interactions_generate(...)
if interaction.status != 'completed':
raise RuntimeError(f"interaction {interaction.status}: {get_text_from_interaction(interaction).strip()}")
video = await get_video_from_interaction(interaction, cls=cls) Defensive patterns
Strategy: retry
Try / catch
try:
interaction = await gemini_interactions_generate(...)
assert interaction.status == "completed", get_text_from_interaction(interaction).strip()
except (ValueError, AssertionError) as e:
if is_transient(e): # failed/cancelled without model explanation
interaction = await gemini_interactions_generate(...) # one retry
else:
raise Prevention
- Keep inline payloads comfortably below the 90 MiB cap to avoid server-side aborts.
- Prefer shorter durations / fewer inputs for the first run of a new workflow.
- Surface interaction.status and the model text together in logs for fast diagnosis.
When it happens
Trigger: gemini_interactions_generate returns a GeminiInteraction whose status field is not 'completed' — provider-side generation failure, safety stop mid-interaction, timeout/cancellation of a long video generation, or an API change introducing a new status value.
Common situations: Long video generations interrupted server-side; content policy stops that abort the interaction rather than returning a refusal message; transient infra failures during preview model rollout; very large inline payloads (near the 90 MiB cap) causing server-side aborts.
Related errors
- Gemini did not generate a video. Try rephrasing your prompt,
- Gemini did not generate a video. Model response: {model_mess
- Too much media to send inline (over {max_inline_bytes // (10
- The current maximum number of supported images is {OMNI_MAX_
- The current maximum number of supported videos is {OMNI_MAX_
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/6568a7540d827998.
Report an issue: GitHub.