An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
Hello @Jan Rzadkosz ,
Welcome to Microsoft Q&A .Thank you for reaching out to us.
The x-ms-oai-image-generation-deployment header identifies the image model deployment used when image-generation functionality is configured.
For a text-only request, this header is not normally expected. The current working hypothesis is that the request generated by the client may unexpectedly contain image-generation-related configuration or capability metadata.
Regarding if an image-generation deployment required?
An image-generation deployment is not documented as a requirement for standard GPT-5.3-Codex operations such as:
- Code generation
- Debugging
- Repository analysis
- Reasoning
- Text-based responses
- Software development assistance
Image input and image generation are separate capabilities. The ability to process an image provided as input should not be interpreted as a requirement to configure image generation for text and code workloads.
Regarding the CLI work while the VS Code extension fails - The CLI started working after reinstallation, while the VS Code extension continued to fail against the same Azure deployment. This makes a deployment-level issue less likely and points more strongly toward a difference in:
- Client or extension versions
- Extension runtime
- Cached extension state
- Persisted authentication or configuration
- Workspace settings
- MCP or custom tool configuration
- Request construction
The CLI reinstall may have refreshed its binaries or local configuration, while the extension may still be using separate or previously stored state.
Please check if the following steps help-
- Comparing client versions
Run codex --version.
Record the VS Code version.
Record the Codex extension version.
- Install the latest compatible extension release.
- Comparing the working and failing configurations Confirm that the CLI and extension use the same:
- Azure endpoint
- Exact deployment name
- Authentication method
- Base URL ending in /openai/v1
- Responses API configuration
- Environment variables and active profiles
- Testing in a clean workspace
Open a new empty folder in VS Code.
Submit a minimal prompt such as Reply with hello.
- If successful, inspect the original workspace for MCP settings, repository instructions, custom tools, and image-related configuration.
- Resetting the extension state
- Sign out from the extension.
- Close all VS Code windows.
- Back up and remove only Codex-related cached storage and saved settings.
- Reinstall the extension.
- Reauthenticate and configure the Azure connection again.
- Performing a direct API control test Send a minimal text-only request to /openai/v1/responses without adding tools.
- If the direct request succeeds, focus the investigation on the extension or client request.
- If the same header error occurs, collect the sanitized request, response, UTC timestamp, and request ID for service-side investigation.
- Comparing successful and failing requests Where diagnostic logging permits, compare:
- A successful CLI request
- A failing extension request
The following references might be helpful , please check them out
- Codex with Azure OpenAI in Microsoft Foundry Models - Microsoft Foundry | Microsoft Learn
- Use the Azure OpenAI Responses API - Microsoft Foundry | Microsoft Learn
- Use the image generation tool (preview) in Foundry Agent Service - Microsoft Foundry | Microsoft Learn
Please let us know if the response was helpful
Thank you