Agno's DALL-E toolkit defaults to dall-e-3, removed May 12: fix

Agno issue 10817: tools/dalle.py:20 and tools/openai.py:53 default to dall-e-3, removed May 12, 2026. A fix and a Python call to Sume instead.

5 min readSume
All posts

Agno's DALL-E toolkit still defaults to dall-e-3, a model OpenAI removed on May 12, 2026, according to an issue filed on October 4. Any agent that calls the toolkit without naming a model gets an error. The fix is to set the model yourself, to gpt-image-2 or one of the 2.5 models, or to generate through another image API.

What the issue reports

Issue 10817 collects several defaults in the library that point at models their providers have shut down. For OpenAI it names tools/dalle.py at line 20 and tools/openai.py at line 53, both defaulting to dall-e-3, with gpt-image-2 as the replacement. OpenAI's deprecations page, read on 2026-10-07, agrees on the date: dall-e-2 and dall-e-3 were announced on November 14, 2025 and removed on May 12, 2026.

The same issue lists Google models too; this article covers only the OpenAI line, which I could confirm against OpenAI's page.

Nothing in the report suggests the toolkit code itself is faulty. The model string is the single point of failure, and it appears twice, in two files, so a fix is small. It is still worth checking whether a newer release of the library has already changed the default before you patch your own copy.

OpenAI defaults in Agno named by issue 10817 (read 2026-10-07)
File and lineDefaultOpenAI removal date
tools/dalle.py:20dall-e-3May 12, 2026
tools/openai.py:53dall-e-3May 12, 2026

Why defaults are the dangerous part

A default is invisible in your code. An agent that was written when dall-e-3 was current has no model string anywhere, so a search of your repository will not find it. The only way to find it is to read the library, or to run the tool.

The practical rule: pass the model on every call. When a library cannot take it, wrap the call.

There is a date arithmetic worth keeping in mind: from the November 14, 2025 announcement to the May 12, 2026 removal is 179 days, so the default had been dead for almost five months when the issue was filed on October 4, 2026.

The same task through Sume

If you would rather call an image API directly from a custom tool, this standard-library function takes a prompt and returns the hosted image URL. It reads the key from SUME_API_KEY and raises when the key is missing. Sume answers 200 with the image, or 202 with a job envelope when the work outlasts its 30-second wait, so the function returns the status as well.

Treat the function as a starting point. In an agent, return the URL to the model, not the raw envelope, and let your orchestrator handle the 202 case with a later read of the job result.

import json, os, urllib.request

def generate_image(prompt: str, quality: str = "medium"):
    key = os.environ.get("SUME_API_KEY")
    if not key:
        raise RuntimeError("SUME_API_KEY is not set")
    body = json.dumps({
        "model": "openai/gpt-image-2.5",
        "prompt": prompt,
        "quality": quality,
        "image_size": {"width": 1024, "height": 1024},
    }).encode()
    req = urllib.request.Request(
        "https://api.sume.com/v1/images",
        data=body,
        headers={"Authorization": f"Bearer {key}", "Content-Type": "application/json"},
    )
    with urllib.request.urlopen(req) as res:
        data = json.load(res)
        if res.status == 200:
            return res.status, data["data"][0]["url"]
        return res.status, data

if __name__ == "__main__":
    print(generate_image("A lighthouse in a storm, ink wash style", "low"))

What changes for the agent

The model returns a Sume-hosted URL, not base64 bytes. If your toolkit expects bytes, add a download step. Billing is the provider list price times 1.25 before cent rounding; the usage.cost field is the final amount. For a 1024x1024 text-only image I estimate about $0.0074 at low and $0.0165 at medium.

GPT Image 2.5 takes custom pixel sizes with both edges divisible by 16, so check any size your agent builds before sending it. See the Image API docs for the full list of limits.

Keep one more habit from this: log the response status and usage.cost for each image your agent makes. A sudden rise in cost per image is the first sign that a default quality or size changed under you.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume