Codex requires imagegen deplyment when changing code
Open 💬 18 comments Opened Jul 9, 2026 by JanekRzodki
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
codex-cli 0.131.0
What subscription do you have?
pay-as-you-go
Which model were you using?
gpt-5.3-codex
What platform is your computer?
_No response_
What terminal emulator and version are you using (if applicable)?
_No response_
Codex doctor report
What issue are you seeing?
i ve been using codex as a vs codex extension for a long time with a Azure Ai Fundry endpoint. Everything worked fine untill today. When I want to change code i get the error: imagegen deployment must be provided through header: x-ms-oai-image-generation-deployment.
Why all of a sudden codex is asking for imagegen deployment?
What steps can reproduce the bug?
azure endpoint
vs code codex extension
gpt-5..3-codex
asking to change the code
What is the expected behavior?
error: imagegen deployment must be provided through header: x-ms-oai-image-generation-deployment.
Additional information
_No response_
18 Comments
Same Problem with the Codex App: Version 26.623.141536 • Released Jul 7, 2026. It's completely unusable with Azure AI Foundry.
The switch
[features]
image_generation = false
works on the cli, but not in the app.
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
in terminal I logged out of the codex: codex logout and then i logged in again and the problem disapeared afer few minutes.
I don't know if it was re-logging that helped or it was just a temporary bug.
Anyone else having the issue?
The problem came back again. even codex app and CLI is not working properly.
Logs from the vs code extension when prompting "hi" in a new chat:
Codex_logs.log
Same problem here
reinstalling codex CLI worked and CLI works but I can not figure out vs code extension - reinstall is not working
facing same issue
facing same issue
codex maintanance team pls hear our prayers 🙏
same problem but with a GPT 5.5 and a 5.4 deployment. Seems to be not tied to a specific GPT version.
facing same issue
same problem here
facing same issue
As a workaround, you can deploy a gpt-image-2 instance, and then set this under your azure provider in
config.toml:http_headers = { "x-ms-oai-image-generation-deployment" = "gpt-image-2" }Just had to update mine to v0.144.1 and that resolved the problem
it turns out that you can even type an imagegen deployment name that you don't have like "abcd".
After that vs code extension works after restarting.
Codex (5.3 at least) is being migrated into gpt-5.4, so it will no longer be usable.
Just create gpt-5.4 deployment in AI Foundry and change config.toml in your .codex direcotry to use gpt-5.4 model.
If you want to still use gpt-5.3-codex change codex cli version to 0.142.5, uninstall vs code extension, clear vs code globalstorage cache, install a 1-2 week old version and it should work fine.