You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Do not attach OpenAI image_generation tool for Codex models #369
autonomous: likelyProbably hands-off: clearly worth fixing, agent can do it, minor judgment needed.from-prIssue created from an external PR during triagepriority: mediumP2 - normal priority
crates/jcode-base/src/provider/openai.rs (~929-932) unconditionally adds { "type": "image_generation" } in ChatGPT mode; Codex models reject/ignore it and it should be gated.
Credit: originally proposed in PR #148. This repo no longer accepts external PRs, so the problem is tracked here instead.
Triage: confirmed in crates/jcode-base/src/provider/openai.rs:929-932 (build_response_request). When is_chatgpt_mode is true the request unconditionally appends {"type":"image_generation"} to the tools array; is_chatgpt_mode is set for all Codex/ChatGPT-backend models (is_chatgpt_mode() at line 731), so Codex models that don't support image generation get the tool attached.
Fix path: gate the image_generation push behind a model capability check (e.g. only push for models that support it) rather than the broad is_chatgpt_mode flag. Localized, low-risk change with a clear path; minor judgment on which model ids qualify, so autonomous: likely.
autonomous: likelyProbably hands-off: clearly worth fixing, agent can do it, minor judgment needed.from-prIssue created from an external PR during triagepriority: mediumP2 - normal priority
Activity
1jehuang commentedon Jun 25, 2026
Triage: confirmed in
crates/jcode-base/src/provider/openai.rs:929-932(build_response_request). Whenis_chatgpt_modeis true the request unconditionally appends{"type":"image_generation"}to the tools array;is_chatgpt_modeis set for all Codex/ChatGPT-backend models (is_chatgpt_mode()at line 731), so Codex models that don't support image generation get the tool attached.Fix path: gate the
image_generationpush behind a model capability check (e.g. only push for models that support it) rather than the broadis_chatgpt_modeflag. Localized, low-risk change with a clear path; minor judgment on which model ids qualify, so autonomous: likely.1jehuang commentedon Jun 25, 2026
Fixed in
b96dfa47(pending release). Built and tests pass on Linux. See commit message for the specific change for this issue.Fix several triaged GH issues (#369, #371, #373, #365, #374, #402)
1jehuang commentedon Jun 28, 2026
Released in v0.32.0. Run
jcode updateto get it.Fix several triaged GH issues (1jehuang#369, 1jehuang#371, 1jehuang#373…
Fix several triaged GH issues (1jehuang#369, 1jehuang#371, 1jehuang#373…