HKUDS/nanobot · error · ImageGenerationError

Zhipu image generation does not support reference images

Error message

Zhipu image generation does not support reference images

What it means

Error "Zhipu image generation does not support reference images" thrown in HKUDS/nanobot.

Source

Thrown at nanobot/providers/image_generation.py:1829

    default_timeout = _ZHIPU_TIMEOUT_S

    def _default_base_url(self) -> str:
        return "https://open.bigmodel.cn/api/paas/v4"

    async def generate(
        self,
        *,
        prompt: str,
        model: str,
        reference_images: list[str] | None = None,
        aspect_ratio: str | None = None,
        image_size: str | None = None,
    ) -> GeneratedImageResponse:
        if not self.api_key:
            raise ImageGenerationError(self.missing_key_message)

        if reference_images:
            raise ImageGenerationError(
                "Zhipu image generation does not support reference images"
            )

        headers = {
            "Authorization": f"Bearer {self.api_key}",
            "Content-Type": "application/json",
            **self.extra_headers,
        }

        body: dict[str, Any] = {
            "model": model,
            "prompt": prompt,
        }

        size = _zhipu_size(aspect_ratio, image_size)
        if size:
            body["size"] = size

View on GitHub (pinned to 42f37dc4c0)

When it happens

Trigger: Thrown at nanobot/providers/image_generation.py:1829 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26). Data as JSON: /api/errors/411e977e988c75bc. Report an issue: GitHub.