from praisonai.capabilities import image_generate# Defaults to gpt-image-2.5-flareresult = image_generate(prompt="A sunset over mountains", size="1024x1024")print(result[0].b64_json[:40], "…")
OpenAI retired dall-e-2/dall-e-3 on 2026-05-12 and gpt-image-1 on 2026-10-23. dall-e-2 is kept only as the variation() default, because it is the only model with a variations endpoint. Use ImageAgent.variation() for that.
from praisonai.capabilities import image_generate# response_format is auto-dropped for gpt-image-*; quality is sent as given.result = image_generate( prompt="A green pixel art landscape", model="gpt-image-2.5-flare", quality="low",)print(result[0].b64_json[:40], "…")
image_edit and aimage_edit accept mask= but reject markup= with a ValueError — LiteLLM does not upload markup as a file, so it would be silently ignored.
from praisonai.capabilities import image_editimage_edit("photo.png", "Make the cup blue", markup="markup.png")# ValueError: 'markup' is not supported through LiteLLM's image_edit yet ...image_edit("photo.png", "Make the cup blue", mask="mask.png") # works
Need markup? Call the OpenAI SDK’s images.edit directly.Reference: PR #6262, fixes #6259.
from praisonai.capabilities import image_generate# Pass drop_params=False to raise if any kwarg is unsupported by the model.result = image_generate( prompt="A sunset over mountains", model="gpt-image-2.5-flare", drop_params=False,)print(result[0].b64_json[:40], "…")
The capability wrapper drops parameters a model rejects before calling LiteLLM, so calls succeed without special-casing.
Model family
response_format
quality
Notes
gpt-image-* (e.g. gpt-image-2.5-flare)
Dropped by wrapper (OpenAI rejects it)
Sent when set
Always returns base64
dall-e-2 (variations only)
Honoured
—
"url" or "b64_json"
Non-OpenAI providers (e.g. stability/...)
Honoured where supported
Sent when set
drop_params=True strips anything unsupported
drop_params=True is injected per call — the global litellm.drop_params is left untouched. The same handling applies to aimage_generate, image_edit, and aimage_edit.