Cannot change models

Resolved 💬 1 comment Opened Aug 24, 2025 by JohnDeeBDD Closed Aug 24, 2025

What version of Codex is running?

codex-cli 0.23.0

Which model were you using?

NA

What platform is your computer?

Linux

What steps can reproduce the bug?

I can't change models. This command works fine:

sudo codex exec "Please create a text file hello.txt and put 'HELLO WORLD' in the file." --full-auto --skip-git-repo-check

Same command but add a model:

sudo codex exec "Please create a text file hello.txt and put 'HELLO WORLD!' in the file." --full-auto --skip-git-repo-check --model=gpt-4.1
[2025-08-24T18:06:45] ERROR: unexpected status 400 Bad Request: {"detail":"Unsupported model"}

sudo codex exec "Please create a text file hello.txt and put 'HELLO WORLD!' in the file." --full-auto --skip-git-repo-check --model=o3
sudo codex exec "Please create a text file hello.txt and put 'HELLO WORLD!' in the file." --full-auto --skip-git-repo-check -m=o3

I tried several model names. Can't get it to switch. What's going on?

What is the expected behavior?

_No response_

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗