Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0310a658f0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c85c2d890
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
codex/codex-rs/core/src/stream_events_utils.rs
Lines 244 to 247 in 70e92b2
ImageGenerationCall responses are recorded but never emitted as user-visible turn items. handle_non_tool_response_item only handles Message, Reasoning, and WebSearchCall, so image-generation outputs fall through to _ => None. In the current clients, raw response events are ignored for chat rendering, so a successful image generation can appear as an empty turn.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
codex/codex-rs/core/src/stream_events_utils.rs
Lines 243 to 246 in 77c88bb
handle_non_tool_response_item only forwards Message, Reasoning, and WebSearchCall. New ResponseItem::ImageGenerationCall items fall into the _ => None branch, so a turn that returns only an image-generation item emits no TurnItem events. Users can end up with a completed turn that appears blank even though an image was produced.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 15fcd7d0fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b89461693f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fn supports_image_generation(model_info: &ModelInfo) -> bool { | ||
| model_info.input_modalities.contains(&InputModality::Image) |
There was a problem hiding this comment.
Gate image-generation tool on generation capability
supports_image_generation checks only input_modalities (Image) to decide whether to expose the image_generation tool. Input modality indicates what a model can consume, not whether it supports image generation. With legacy/default metadata (which often includes image input), unsupported models can still get this tool and the Responses request can be rejected for unsupported tool configuration.
Useful? React with 👍 / 👎.
| } | ||
| } | ||
|
|
||
| fn supports_image_generation(model_info: &ModelInfo) -> bool { |
There was a problem hiding this comment.
you can have it inline
There was a problem hiding this comment.
💡 Codex Review
codex/codex-rs/core/src/stream_events_utils.rs
Lines 244 to 247 in 539718f
Streaming only converts Message/Reasoning/WebSearch items into TurnItems. The new ResponseItem::ImageGenerationCall falls through to None, so a turn that returns only an image generation result records history but emits no user-visible output item. This makes successful image generations appear blank in the live UI/event stream.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
codex/codex-rs/core/src/stream_events_utils.rs
Lines 243 to 246 in f0ec57b
handle_non_tool_response_item only maps Message, Reasoning, and WebSearchCall. ImageGenerationCall falls through to None, so OutputItemDone emits no started/completed turn item and users get no visible output for image-only turns. The image is silently recorded in history but not surfaced in the live turn stream.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 480cfa34da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ResponseItem::ImageGenerationCall { result, .. } => { | ||
| let image_url = if result.starts_with("data:") { | ||
| result | ||
| } else { | ||
| format!("data:image/png;base64,{result}") | ||
| }; |
There was a problem hiding this comment.
Skip replaying unsuccessful image generation calls
rewrite_image_generation_calls_for_stateless_input rewrites every ImageGenerationCall into InputImage without checking status or that result is non-empty. Failed/partial calls become data:image/png;base64,{result} and are resent on later turns. Invalid-image recovery currently rewrites only tool-output images, so this can repeatedly trigger BadRequest and poison the thread.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
codex/codex-rs/core/src/stream_events_utils.rs
Lines 243 to 247 in 58b71c1
handle_non_tool_response_item does not handle ResponseItem::ImageGenerationCall, so image-generation results fall through to _ => None and never produce ItemCompleted events. Since TUI ignores RawResponseItem events and app-server raw events are opt-in, default clients won't render generated images despite successful calls.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Core tool-calling for image-gen, handles requesting and receiving logic for images using response API