bug: output_schema is not supported for Chat Completions API
Resolved 💬 3 comments Opened Oct 20, 2025 by peter-jerry-ye Closed Oct 21, 2025
💡 Likely answer: A maintainer (pakrym-oai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.46.0
What subscription do you have?
None
Which model were you using?
_No response_
What platform is your computer?
Darwin 24.6.0 arm64 arm
What issue are you seeing?
When executing the structure output sample, I got:
error: Uncaught (in promise) Error: unsupported operation: output_schema is not supported for Chat Completions API
which I assume comes from here
What steps can reproduce the bug?
Just execute the structure output sample
What is the expected behavior?
Get a proper response
Additional information
_No response_
3 Comments
Do you have a model or model provider override in your config.toml? We currently don't support structured output with chat-based models.
Ah, I forgot that I had a
config.toml. Sorry for that.Btw, will the structured output be supported for chat-based models?