{"record":{"id":"a74ae500c40a5678","repo":"Comfy-Org/ComfyUI","slug":"model-refused-to-respond-block-refusal","errorCode":null,"errorMessage":"Model refused to respond: {block.refusal}","messagePattern":"Model refused to respond: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_bytedance_llm.py","lineNumber":82,"sourceCode":"            tooltip=\"Controls randomness. 0.0 is deterministic, higher values are more random.\",\n            advanced=True,\n        ),\n    ]\n\n\ndef _get_text_from_response(response: BytePlusResponseObject) -> str:\n    \"\"\"Extract concatenated text from all assistant message output_text blocks.\"\"\"\n    if not response.output:\n        return \"\"\n    chunks: list[str] = []\n    for item in response.output:\n        if item.type != \"message\" or not item.content:\n            continue\n        for block in item.content:\n            if block.type == \"output_text\" and block.text:\n                chunks.append(block.text)\n            elif block.type == \"refusal\" and block.refusal:\n                raise ValueError(f\"Model refused to respond: {block.refusal}\")\n    return \"\\n\".join(chunks)\n\n\nasync def _build_image_content_blocks(\n    cls: type[IO.ComfyNode],\n    image_tensors: list[Input.Image],\n) -> list[BytePlusInputImage]:\n    urls = await upload_images_to_comfyapi(\n        cls,\n        image_tensors,\n        max_images=SEED_MAX_IMAGES,\n        wait_label=\"Uploading reference images\",\n    )\n    return [BytePlusInputImage(image_url=url) for url in urls]\n\n\nasync def _build_video_content_blocks(\n    cls: type[IO.ComfyNode],","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_bytedance_llm.py#L64-L100","documentation":"Raised while parsing a ByteDance Seed (LLM) responses-API reply: an output message contained a content block of type 'refusal' with non-empty text. This mirrors the OpenAI-style Responses API refusal mechanism — the model (or its safety layer) declined to answer, and the refusal text is passed through verbatim.","triggerScenarios":"A chat/completions call to BYTEPLUS_RESPONSES_ENDPOINT returns an assistant message whose content includes {type: 'refusal', refusal: '...'} — typically triggered by prompts the safety filter classifies as disallowed.","commonSituations":"Prompts touching violence, personal data, or other policy categories; jailbreak-adjacent phrasing; regionally restricted topics; occasionally over-triggering on benign medical/security research wording.","solutions":["Read the refusal text in the error — it usually states which policy was hit.","Rephrase the prompt to remove the triggering content or framing.","Move the sensitive constraint into the system_prompt with a professional, clinical framing if it is legitimate.","Try a different Seed model from the model dropdown if one is available with different filtering."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    result = await seed_node.execute(...)\nexcept ValueError as e:\n    if \"refused to respond\" in str(e):\n        # policy refusal: rephrase prompt, do not retry unchanged\n        return fallback_text","preventionTips":["Keep prompts within the provider's content policy.","Watch system prompts too — restrictive instructions can induce refusals.","Have a fallback phrasing ready for automated pipelines that hit refusals."],"tags":["comfyui","bytedance","seed-llm","refusal","content-moderation"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}