Tool Calls Broken when Using Azure OpenAI models with Codex

Resolved 💬 2 comments Opened Mar 24, 2026 by willriley Closed Mar 24, 2026

What version of Codex CLI is running?

codex-cli 0.116.0

What subscription do you have?

N/A - using via Azure's Foundry

Which model were you using?

gpt-5.4, also gpt-5.4 pro

What platform is your computer?

Darwin 23.6.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

Warp

What issue are you seeing?

I followed this guide to set up Codex CLI: https://learn.microsoft.com/en-us/azure/foundry/openai/how-to/codex

Codex breaks as soon as the first tool call happens. Then it prints out this error and the chat cannot be continued.

■ {
"error": {
"code": "invalid_payload",
"message": "Invalid payload",
"type": "invalid_request_error",
"details": [
{
"code": "ValidationError",
"message": "type: Value is \"array\" but should be \"string\"",
"param": "/input",
"type": "error",
"details": []
},
{
"code": "ValidationError",
"message": "required: Required properties [\"id\"] are not present",
"param": "/input/5",
"type": "error",
"details": []
},
{
"code": "ValidationError",
"message": "type: Value is \"null\" but should be \"array\"",
"param": "/input/5/content",
"type": "error",
"details": []
}
],
"additionalInfo": {
"request_id": "6b30f08e0a9407e56055f1d59357f35d"
}
}
}

What steps can reproduce the bug?

  1. Set up Azure OpenAI models for use with the Codex CLI
  2. Open up Codex CLI
  3. Ask any prompt that will trigger a tool call

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗