{"record":{"id":"6568a7540d827998","repo":"Comfy-Org/ComfyUI","slug":"gemini-interaction-did-not-complete-status-inte","errorCode":null,"errorMessage":"Gemini interaction did not complete (status: {interaction.status}).","messagePattern":"Gemini interaction did not complete \\(status: (.+?)\\)\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_gemini.py","lineNumber":1689,"sourceCode":"            )\n            parts.extend(to_interaction_media_part(p) for p in media_parts)\n        parts.append(GeminiInteractionTextPart(text=prompt))\n        interaction = await sync_op(\n            cls,\n            ApiEndpoint(path=GEMINI_INTERACTIONS_ENDPOINT, method=\"POST\"),\n            data=GeminiInteractionRequest(\n                model=model_id,\n                input=parts,\n                generation_config=GeminiInteractionGenerationConfig(\n                    temperature=model.get(\"temperature\", 1.0),\n                    top_p=model.get(\"top_p\", 0.95),\n                ),\n            ),\n            response_model=GeminiInteraction,\n        )\n        if interaction.status != \"completed\":\n            model_message = get_text_from_interaction(interaction).strip()\n            raise ValueError(\n                f\"Gemini interaction did not complete (status: {interaction.status}).\"\n                + (f\" Model response: {model_message}\" if model_message else \"\")\n            )\n        return IO.NodeOutput(\n            await get_video_from_interaction(interaction, cls=cls),\n            get_text_from_interaction(interaction),\n        )\n\n\nclass GeminiExtension(ComfyExtension):\n    @override\n    async def get_node_list(self) -> list[type[IO.ComfyNode]]:\n        return [\n            GeminiNode,\n            GeminiNodeV2,\n            GeminiImage,\n            GeminiImage2,\n            GeminiNanoBanana2,","sourceCodeStart":1671,"sourceCodeEnd":1707,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_gemini.py#L1671-L1707","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\ninteraction = await gemini_interactions_generate(...)\nvideo = await get_video_from_interaction(interaction, cls=cls)  # raises: did not complete (status: failed)\n\n// after\ninteraction = await gemini_interactions_generate(...)\nif interaction.status != 'completed':\n    raise RuntimeError(f\"interaction {interaction.status}: {get_text_from_interaction(interaction).strip()}\")\nvideo = await get_video_from_interaction(interaction, cls=cls)","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    interaction = await gemini_interactions_generate(...)\n    assert interaction.status == \"completed\", get_text_from_interaction(interaction).strip()\nexcept (ValueError, AssertionError) as e:\n    if is_transient(e):  # failed/cancelled without model explanation\n        interaction = await gemini_interactions_generate(...)  # one retry\n    else:\n        raise","preventionTips":["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."],"tags":["gemini","interactions-api","video-generation","status-check","retryable","comfy-api-nodes"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}