{"record":{"id":"1883f7f6c0546247","repo":"HKUDS/nanobot","slug":"stepfun-image-generation-failed-detail","errorCode":null,"errorMessage":"StepFun image generation failed: {detail}","messagePattern":"StepFun image generation failed: (.+?)","errorType":"exception","errorClass":"ImageGenerationError","httpStatus":null,"severity":"error","filePath":"nanobot/providers/image_generation.py","lineNumber":1742,"sourceCode":"        refs = list(reference_images or [])\n        if refs and \"1x\" in model:\n            body[\"style_reference\"] = {\n                \"source_url\": image_path_to_data_url(refs[0]),\n            }\n\n        body.update(self.extra_body)\n\n        response = await self._http_post(\n            f\"{self.api_base}/images/generations\",\n            headers=headers,\n            body=body,\n        )\n\n        try:\n            response.raise_for_status()\n        except httpx.HTTPStatusError as exc:\n            detail = response.text[:500]\n            raise ImageGenerationError(\n                f\"StepFun image generation failed: {detail}\"\n            ) from exc\n\n        payload = response.json()\n        images = _stepfun_images_from_payload(payload)\n\n        self._require_images(images, payload)\n\n        return GeneratedImageResponse(images=images, content=\"\", raw=payload)\n\n\ndef _stepfun_size(\n    aspect_ratio: str | None,\n    image_size: str | None,\n) -> str:\n    \"\"\"Resolve aspect ratio / image_size to StepFun size string.\n\n    StepFun expects ``WIDTHxHEIGHT`` (note: width x height, not the more","sourceCodeStart":1724,"sourceCodeEnd":1760,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/providers/image_generation.py#L1724-L1760","documentation":"Error \"StepFun image generation failed: {detail}\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/providers/image_generation.py:1742 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}