OpenAI rejects requests

Resolved 💬 8 comments Opened Apr 16, 2025 by mariobm Closed Apr 16, 2025
💡 Likely answer: A maintainer (tibo-openai, collaborator) responded on this thread — see the highlighted reply below.

<img width="1177" alt="Image" src="https://github.com/user-attachments/assets/4ed34138-8ebf-49ad-a11a-a507472f7306" />

Environment information

  • I have OPENAI_API_KEY set in ~/.zshrc
  • I'm using node v22.13.0
  • MacOS 15.4 (24E248)

Steps to reproduce

  1. nvm use --lts (for me it's v22.13.0)
  2. Add export OPENAI_API_KEY="sk-proj-xxxx" to ~/.zshrc and source it (source ~/.zshrc)
  3. npm install -g @openai/codex
  4. mkdir listing-web && cd listing-web && git init
  5. codex -m o4-mini -a full-auto --image someimage.jpg also codex "what can you do?"

Expected result

  • Not to reject my call

Steps tried to mitigate

  • Create new API Key

EDIT: Fixed typo in commands

View original on GitHub ↗

8 Comments

kofron · 1 year ago

Can repro on node v22.2.0.

ratacat · 1 year ago

Same for me on v23.4.0. OSX 14.3, tried multiple api keys. Just trying

codex "explain this code to me"

edit I think it has to do with access to particular models. I just tried

codex "explain this codebase to me" -m "gpt-4o"

And it worked fine. the defualt model is o4-mini, and I think I don't have access to that on my account

pavelsukhachev · 1 year ago

change a model to 'o4-mini-2025-04-16' than it will work!

tibo-openai collaborator · 1 year ago
mariobm · 1 year ago

@pashvc Thanks, it's working now. Although it's misleading because the gif in the README.md clearly shows o4-mini

tibo-openai collaborator · 1 year ago

thanks for the report and glad it's now fixed, closing!

dllu · 1 year ago

I can't seem to upgrade to 0.1.4161114. What am I doing wrongly?

» sudo npm update -g @openai/codex
npm error Invalid Version: 0.1.04161114
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-04-16T18_34_51_118Z-debug-0.log
» sudo npm uninstall -g @openai/codex

removed 326 packages in 343ms
» sudo npm install -g @openai/codex
npm warn deprecated phin@2.9.3: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated lodash.isequal@4.5.0: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.

added 326 packages in 2s

84 packages are looking for funding
  run `npm fund` for details
» codex --version
0.1.4161006

versions:

» npm --version
11.3.0
» node --version
v23.11.0

log:

npm-update.log

mariobm · 1 year ago

@tibo-openai Can you look this up again? I have the same issue as @dllu above

~/git/listing-web master ?2 ❯ codex --version
0.1.4161006

~/git/listing-web master ?2 ❯ npm cache clean -f
npm warn using --force Recommended protections disabled.
⠸

~/git/listing-web master ?2 ❯ npm uninstall -g @openai/codex

removed 326 packages in 2s

~/git/listing-web master ?2 ❯ npm install -g @openai/codex
npm warn deprecated phin@2.9.3: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated lodash.isequal@4.5.0: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.

added 326 packages in 8s

84 packages are looking for funding
  run `npm fund` for details

~/git/listing-web master ?2 ❯ codex --version 
0.1.4161006

~/git/listing-web master ?2 ❯ npm list -g @openai/codex
/opt/homebrew/lib
└── @openai/codex@0.1.04161210


~/git/listing-web master ?2 ❯ codex "hello world"                                                                                      
⚠️  OpenAI rejected the request (request ID: req_597f4990b168df9e2c80b98ecb32363c). Please verify your settings and try again