Skip to content

fix!: switch DALLEImageGenerator to gpt-image-2#11321

Merged
anakin87 merged 5 commits into
mainfrom
dalle-retired
May 15, 2026
Merged

fix!: switch DALLEImageGenerator to gpt-image-2#11321
anakin87 merged 5 commits into
mainfrom
dalle-retired

Conversation

@anakin87
Copy link
Copy Markdown
Member

@anakin87 anakin87 commented May 15, 2026

Related Issues

Proposed Changes:

  • switch DALLEImageGenerator to gpt-image-2, adapt for API changes but trying to keep backward compatibility

How did you test it?

CI, new (slow) integration test

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines.
  • I have run pre-commit hooks and fixed any issue.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
haystack-docs Ready Ready Preview, Comment May 15, 2026 10:06am

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  haystack/components/generators
  openai_dalle.py
  haystack/core/pipeline
  async_pipeline.py
Project Total  

This report was generated by python-coverage-comment-action

@anakin87 anakin87 marked this pull request as ready for review May 15, 2026 09:37
@anakin87 anakin87 requested a review from a team as a code owner May 15, 2026 09:37
@anakin87 anakin87 requested review from bogdankostic and removed request for a team May 15, 2026 09:37
@claude
Copy link
Copy Markdown

claude Bot commented May 15, 2026

Code review

Checked for bugs and CLAUDE.md compliance. One issue found:

assert self.client without explanationhaystack/components/generators/openai_dalle.py line 127 (link)

AGENTS.md states: "To fix type issues, avoid type: ignore, casts, or assertions when possible. If they are necessary, explain why." (AGENTS.md L46-L50).

The new assert self.client replaces the prior # type: ignore[union-attr] but lacks an inline rationale. Other comparable type-narrowing assertions in this codebase consistently include a brief comment explaining why mypy needs the hint. Consider adding an explanatory comment, e.g.:

assert self.client is not None  # warm_up() sets self.client; hint for mypy

Copy link
Copy Markdown
Contributor

@bogdankostic bogdankostic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, I'm just wondering if at some point we should also rename the component to something like OpenAIImageGenerator.

@anakin87
Copy link
Copy Markdown
Member Author

Looking good, I'm just wondering if at some point we should also rename the component to something like OpenAIImageGenerator.

Noted for Haystack 3 on Notion

@anakin87 anakin87 merged commit 2cfe1fa into main May 15, 2026
28 checks passed
@anakin87 anakin87 deleted the dalle-retired branch May 15, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dall-E models have been retired -> DALLEImageGenerator does not work

2 participants