{"record":{"id":"4f53b24618f43f21","repo":"HKUDS/nanobot","slug":"aihubmix-image-generation-failed-detail","errorCode":null,"errorMessage":"AIHubMix image generation failed: {detail}","messagePattern":"AIHubMix image generation failed: (.+?)","errorType":"exception","errorClass":"ImageGenerationError","httpStatus":null,"severity":"error","filePath":"nanobot/providers/image_generation.py","lineNumber":538,"sourceCode":"        model_path = _aihubmix_model_path(model)\n        url = f\"{self.api_base}/models/{model_path}/predictions\"\n        try:\n            response = await self._http_post(\n                url,\n                headers={**headers, \"Content-Type\": \"application/json\"},\n                body=body,\n                client=client,\n            )\n        except httpx.TimeoutException as exc:\n            raise ImageGenerationError(\"AIHubMix image generation timed out\") from exc\n        except httpx.RequestError as exc:\n            raise ImageGenerationError(f\"AIHubMix image generation request failed: {exc}\") from exc\n\n        try:\n            response.raise_for_status()\n        except httpx.HTTPStatusError as exc:\n            detail = response.text[:500]\n            raise ImageGenerationError(f\"AIHubMix image generation failed: {detail}\") from exc\n\n        payload = _as_json_object(response.json()) or {}\n        images = await _aihubmix_images_from_payload(payload, proxy=self.proxy)\n\n        self._require_images(images, payload)\n\n        return GeneratedImageResponse(images=images, content=\"\", raw=payload)\n\n\ndef _http_error_detail(response: httpx.Response) -> str:\n    \"\"\"Extract a readable error message from an HTTP error response.\"\"\"\n    try:\n        data = _as_json_object(response.json())\n        if data is not None:\n            err = _as_json_object(data.get(\"error\"))\n            if err is not None:\n                message = err.get(\"message\")\n                return message if isinstance(message, str) else str(err)","sourceCodeStart":520,"sourceCodeEnd":556,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/providers/image_generation.py#L520-L556","documentation":"Error \"AIHubMix image generation failed: {detail}\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/providers/image_generation.py:538 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"}