{"record":{"id":"d39ec08b598e32f7","repo":"NousResearch/hermes-agent","slug":"image-generation-produced-no-usable-drafts","errorCode":null,"errorMessage":"image generation produced no usable drafts","messagePattern":"image generation produced no usable drafts","errorType":"exception","errorClass":"GenerationError","httpStatus":null,"severity":"error","filePath":"agent/pet/generate/orchestrate.py","lineNumber":163,"sourceCode":"                break\n            index, path, err = fut.result()\n            if path is None:\n                if err:\n                    errors.append(err)\n                continue\n            results[index] = path\n            if on_draft is not None:\n                try:\n                    on_draft(index, path)\n                except Exception as exc:  # noqa: BLE001 - progress is best-effort\n                    logger.debug(\"on_draft callback failed: %s\", exc)\n\n    drafts = [results[i] for i in sorted(results)]\n    if not drafts and not cancelled():\n        # Surface *why* — every draft failed for a reason (a content-policy refusal\n        # on a name like \"minion\", a provider/auth error, …); the most common one\n        # is the representative cause. Far more useful than \"no usable drafts\".\n        raise GenerationError(_drafts_failed_reason(errors))\n    return drafts\n\n\ndef _drafts_failed_reason(errors: list[str]) -> str:\n    \"\"\"The representative reason a draft round produced nothing, humanized.\"\"\"\n    if not errors:\n        return \"image generation produced no usable drafts\"\n    from collections import Counter\n\n    return _humanize_image_error(Counter(errors).most_common(1)[0][0])\n\n\ndef _humanize_image_error(error: str) -> str:\n    \"\"\"Turn a raw provider error into a friendly, actionable sentence.\n\n    The big one is moderation: image models refuse trademarked characters and\n    real people (e.g. \"minion\"), which reads as an opaque 400 otherwise.\n    \"\"\"","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/pet/generate/orchestrate.py#L145-L181","documentation":"Error \"image generation produced no usable drafts\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at agent/pet/generate/orchestrate.py:163 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Regenerate; none of the drafts passed validation.","Adjust the prompt/reference image so drafts meet the atlas requirements.","Check the image backend output for malformed or empty images."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}