codex icon indicating copy to clipboard operation
codex copied to clipboard

"OpenAI rejected the request"

Open avaer opened this issue 1 year ago • 41 comments

I set export OPENAI_API_KEY= and ran the codex cli with a simple prompt "read the README.md" and ran into this error:

    ⚠️  OpenAI rejected the request (request ID: req_13e38c243f89126dd24093d2e4892535). Please verify your settings and
    try again.

Is there any way to debug this?

avaer avatar Apr 16 '25 17:04 avaer

Running into this too, and have access to all models.

LuciferMornens avatar Apr 16 '25 17:04 LuciferMornens

Ran into this exact issue

shobhitic avatar Apr 16 '25 17:04 shobhitic

Can confirm

ndisalvio3 avatar Apr 16 '25 17:04 ndisalvio3

++ Same issue

maheshrijal avatar Apr 16 '25 17:04 maheshrijal

Surely there must be a step somewhere where I can provide my API key? The README.md just says to run the npm command and there's "zero configuration" from there. How could that be? Is OpenAI providing this service for free?

In the OP's description they mention OPENAI_API_KEY because it's only in the Non‑interactive / CI mode section. Should we have that in our environment anyway?

I have that but still get this result.

adamjgrant avatar Apr 16 '25 17:04 adamjgrant

same

justinechang39 avatar Apr 16 '25 17:04 justinechang39

same

rasdani avatar Apr 16 '25 17:04 rasdani

as well

MadcowD avatar Apr 16 '25 17:04 MadcowD

Happening here as well, maybe still rolling out? I'm on tier 5 and have access via the API and playground.

johanbaath avatar Apr 16 '25 17:04 johanbaath

same pinch.

DhrubaPatra avatar Apr 16 '25 17:04 DhrubaPatra

samesies! <3 super pumepd though!

bradennapier avatar Apr 16 '25 17:04 bradennapier

it prob cant find the key because workdir is defaulted to "~"

anyone see how to specify workdir?

│ localhost session: * │ ↳ workdir: ~ │ ↳ model: o4-mini │ ↳ approval: suggest

wrong issue, but just run codex on the workdir you want, ex: cd code/react/foo; codex

EverStarck avatar Apr 16 '25 17:04 EverStarck

This is the issue actually:

    system
    ⚠️  OpenAI rejected the request (request ID: req_a057493e36bb3dda8a2fe4646b7d4cb0): 400 Your organization must be verified to generate reasoning summaries. Please go to: 
https://platform.openai.com/settings/organization/general and click on Verify Organization.. Please verify your settings and try again.

https://platform.openai.com/settings/organization/general

I made a PR to fix this. https://github.com/openai/codex/pull/23

MadcowD avatar Apr 16 '25 17:04 MadcowD

Same problem here!

leandroz avatar Apr 16 '25 17:04 leandroz

Hey! 👋

So just a thought — the default model used by the CLI is o4-mini, which I think might not be fully rolled out to everyone yet. If your API key doesn’t have access to that model, that could explain the rejection error you’re seeing.

You might want to try running the /model command in the CLI and picking something like gpt-4.5 instead — basically any model you know you have access to — and see if that helps.

Not totally sure that’s the issue, but worth trying! Let me know if that works for you.

cruffinoni avatar Apr 16 '25 17:04 cruffinoni

Hey! 👋

So just a thought — the default model used by the CLI is o4-mini, which I think might not be fully rolled out to everyone yet. If your API key doesn’t have access to that model, that could explain the rejection error you’re seeing.

You might want to try running the /model command in the CLI and picking something like gpt-4.5 instead — basically any model you know you have access to — and see if that helps.

Not totally sure that’s the issue, but worth trying! Let me know if that works for you.

I tried with o3-mini and it has the same issue.

goldensunliu avatar Apr 16 '25 17:04 goldensunliu

Switched to 4o and it fixed!

shobhitic avatar Apr 16 '25 17:04 shobhitic

Anyone else facing the same issue with a different OPENAI_BASE_URL ? I've got a LiteLLM server with O3-mini connected to it, but face the same issue

SupreethRao99 avatar Apr 16 '25 17:04 SupreethRao99

Hey! 👋

So just a thought — the default model used by the CLI is o4-mini, which I think might not be fully rolled out to everyone yet. If your API key doesn’t have access to that model, that could explain the rejection error you’re seeing.

You might want to try running the /model command in the CLI and picking something like gpt-4.5 instead — basically any model you know you have access to — and see if that helps.

Not totally sure that’s the issue, but worth trying! Let me know if that works for you.

this is indeed the problem

o4-mini-2025-04-16 works! and it works ... amazing this is awesome !

bradennapier avatar Apr 16 '25 17:04 bradennapier

It seems to be a rollout issue.

o3 nor o3-2025-04-16 work though.

gpt-4.1 and o4-mini-2025-04-16 seem to work.

EDIT: After verifying my organization, o3 works

HeroBrian389 avatar Apr 16 '25 17:04 HeroBrian389