{"record":{"id":"4a2da8fdb2ed9c5b","repo":"HKUDS/nanobot","slug":"generated-image-exceeded-the-32-mib-download-limit","errorCode":null,"errorMessage":"generated image exceeded the 32 MiB download limit","messagePattern":"generated image exceeded the 32 MiB download limit","errorType":"exception","errorClass":"ImageGenerationError","httpStatus":null,"severity":"error","filePath":"nanobot/providers/image_generation.py","lineNumber":198,"sourceCode":"                    )\n                    if not ok:\n                        raise ImageGenerationError(\n                            f\"blocked unsafe generated image URL: {error}\"\n                        )\n                async with client.stream(\"GET\", current_url) as response:\n                    if response.is_redirect:\n                        location = response.headers.get(\"location\")\n                        if not location:\n                            raise ImageGenerationError(\n                                \"generated image URL redirected without a location\"\n                            )\n                        current_url = urljoin(str(response.url), location)\n                        continue\n\n                    try:\n                        response.raise_for_status()\n                    except httpx.HTTPStatusError as exc:\n                        raise ImageGenerationError(\n                            f\"failed to download generated image (HTTP {response.status_code})\"\n                        ) from exc\n\n                    declared_size = response.headers.get(\"content-length\")\n                    if declared_size:\n                        try:\n                            if int(declared_size) > _IMAGE_DOWNLOAD_MAX_BYTES:\n                                raise ImageGenerationError(\n                                    \"generated image exceeded the 32 MiB download limit\"\n                                )\n                        except ValueError:\n                            pass\n\n                    chunks: list[bytes] = []\n                    total = 0\n                    async for chunk in response.aiter_bytes():\n                        total += len(chunk)\n                        if total > _IMAGE_DOWNLOAD_MAX_BYTES:","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/providers/image_generation.py#L180-L216","documentation":"Error \"generated image exceeded the 32 MiB download limit\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/providers/image_generation.py:198 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"}