Tool Calls Broken when Using Azure OpenAI models with Codex

Resolved 💬 2 comments Opened Mar 24, 2026 by willriley Closed Mar 24, 2026
💡 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.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 ↗

2 Comments

github-actions[bot] contributor · 5 months ago

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

  • #14695

Powered by Codex Action

snympi · 5 months ago

This is still an issue. The suspected duplicate listed here https://github.com/openai/codex/issues/14695 is because of a folder location issue, so closing this issue because it appears to be a duplicate is wrong. I have the same problem as described here, but using native local folder and the repro described here is still true.