fix(image_gen): gate openai-codex image generation on Codex tool support - #49065
fix(image_gen): gate openai-codex image generation on Codex tool support#49065izumi0uu wants to merge 1 commit into
Conversation
|
Thanks for the careful capability analysis and regression coverage. This is an automated hermes-sweeper review; the reported failure is already handled on current
The implementation uses the PR's stated acceptable outcome—an explicit capability error instead of a generic API failure—on the definitive generation path. |
|
Correction — this PR was closed for the wrong reason, and I want that on the record. It was closed as But that 400 is a request-shape rejection — the Codex backend resolves I removed that classifier in #71635 ( Your PR was pointed at the right area and closing it against that classifier was a mistake on our side. The direction we ultimately took differs from this PR — rather than surfacing a clearer "unsupported" error, we fixed the request so the failure stops happening, and deliberately stopped interpreting provider errors at all on this path. So this stays closed, but as "superseded by a different fix," not "already handled." Thanks for the work, and sorry for the bad close reason. |
What does this PR do?
Fixes a false-positive availability bug in the
openai-codeximage generation provider.Before this change, the provider could appear available as soon as Codex auth credentials were present, even when the current Codex backend did not actually expose the
image_generationtool. That led to confusing runtime failures when Hermes tried to force the tool through the Responses API.This patch makes the provider capability-aware so unsupported Codex surfaces are treated as unavailable or reported with an explicit capability error instead of a generic API failure.
Related Issue
Fixes #49008
Type of Change
Changes Made
openai-codeximage provider.capability_unsupported.How to Test
Run:
Confirm the targeted suite passes.
Verify that
openai-codexavailability now depends on confirmedimage_generationsupport instead of token presence alone.Verify that unsupported Codex tool surfaces return
capability_unsupportedrather than a generic API error.Checklist
Code
fix(scope):,feat(scope):, etc.)Documentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/ARemaining Risks