HKUDS/nanobot · error · ImageGenerationError

Ollama image generation does not support reference images

Error message

Ollama image generation does not support reference images

What it means

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

Source

Thrown at nanobot/providers/image_generation.py:649

    def _resolve_base_url(self, api_base: str | None) -> str:
        if api_base:
            base = api_base.rstrip("/")
            if base.endswith("/v1"):
                return f"{base[:-3]}/api"
            return base
        return self._default_base_url()

    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 reference_images:
            raise ImageGenerationError(
                "Ollama image generation does not support reference images"
            )

        width, height = _ollama_dimensions(aspect_ratio, image_size)
        body: dict[str, Any] = {
            "model": model,
            "prompt": prompt,
            "width": width,
            "height": height,
            "steps": 0,
        }
        body.update(self.extra_body)
        body["stream"] = False

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

View on GitHub (pinned to 42f37dc4c0)

When it happens

Trigger: Thrown at nanobot/providers/image_generation.py:649 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/26198dc1cf9e5f8d. Report an issue: GitHub.