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_

View original on GitHub ↗

18 Comments

ahlner · 11 days ago

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.

github-actions[bot] contributor · 11 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #30557

Powered by Codex Action

JanekRzodki · 11 days ago

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?

JanekRzodki · 11 days ago

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

joaquinsc999 · 11 days ago

Same problem here

JanekRzodki · 11 days ago

reinstalling codex CLI worked and CLI works but I can not figure out vs code extension - reinstall is not working

Neel-Error404 · 11 days ago

facing same issue

nookesh-ai · 11 days ago

facing same issue

JanekRzodki · 11 days ago

codex maintanance team pls hear our prayers 🙏

Hypernut · 11 days ago

same problem but with a GPT 5.5 and a 5.4 deployment. Seems to be not tied to a specific GPT version.

mur-anc · 11 days ago

facing same issue

KawaiiSh1zuku · 10 days ago

same problem here

lianneli · 10 days ago

facing same issue

TreeOfLearning · 10 days ago

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" }

Hundsmuhlen · 10 days ago

Just had to update mine to v0.144.1 and that resolved the problem

JanekRzodki · 10 days ago

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.

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" }
JanekRzodki · 9 days ago

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.

JanekRzodki · 8 days ago

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.