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
Mirrored from upstream 1jehuang/jcode — Pull Request #148 by @naveenreddy007
Original state: open
Created: 2026-05-06T18:46:15Z · Updated: 2026-05-06T18:46:19Z
Diff: https://github.com/1jehuang/jcode/pull/148.diff
This issue is an auto-mirrored copy. Comments and edits here are local to quangdang46/jcode — do not expect them to propagate upstream.
Summary
Do not attach the provider-native image_generation tool when the active OpenAI/ChatGPT model is a Codex model.
Preserve native image generation for non-Codex ChatGPT models.
Add payload regression tests for both supported and unsupported model families.
Why
ChatGPT/Codex routes such as gpt-5.3-codex-spark can reject requests with:
invalid_request_error: Tool 'image_generation' is not supported with gpt-5.3-codex-spark-1p-codexswic-ev3.
This happens because Jcode currently adds image_generation for all ChatGPT-mode OpenAI requests. Codex models do not support that native tool, so requests can fail before the assistant can respond.
Validation
cargo fmt --all
cargo test test_chatgpt_payload_ --lib
cargo build --release
Need help on this PR? Tag @codesmith with what you need.
Summary
image_generationtool when the active OpenAI/ChatGPT model is a Codex model.Why
ChatGPT/Codex routes such as
gpt-5.3-codex-sparkcan reject requests with:This happens because Jcode currently adds
image_generationfor all ChatGPT-mode OpenAI requests. Codex models do not support that native tool, so requests can fail before the assistant can respond.Validation
cargo fmt --allcargo test test_chatgpt_payload_ --libcargo build --releaseNeed help on this PR? Tag
@codesmithwith what you need.