OpenAI rejected the request
What version of Codex is running?
0.1.2505172129
Which model were you using?
o4-mini
What platform is your computer?
darwin | arm64 | 24.3.0
What steps can reproduce the bug?
- ```
have to make changes in the names of typeDefs and resolvers, have to append the service name in prefix of all the typeDefs as we are
using gateway and micro service arch and these name can collide with other serives names, so the solution is to
append the service name in prefix of all typedefs like this, if def is "Company" then change it to "cpsCompany"
```
3 reasoning|1 tool
What is the expected behavior?
It should start working on the solution asked.
What do you see instead?
system
⚠️ OpenAI rejected the request (request ID: req_a73578496aa5230c003a078caeca57c3). Error details: Status:
400, Code: unknown, Type: invalid_request_error, Message: 400 Item
'rs_6842c014b734819297f3c03c8e7b7afe08816fbe83d2026c' of type 'reasoning' was provided without its required
following item.. Please verify your settings and try again.
Additional information
_No response_
Showing cached comments. Read the full discussion on GitHub ↗
19 Comments
i also get this on codex mini latest on darwin
Issue is also present when calling Response API directly. Submitted to the OpenAI through their help. When model is doing more reasoning before a function call, this error is present. You must include reasonings to the inputs before any function call, or there's an issue that you have omitted the reasonings.
It worked yesterday fine.
also having this issue
system
⚠️ OpenAI rejected the request (request ID: req_0f72d8ec94cd9af42b7846228fefa812). Error details: Status: ╯
400, Code: unknown, Type: invalid_request_error, Message: 400 Item
'rs_6842dc1c9b808198be2da0b6fd6f344507e8e1c282084f17' of type 'reasoning' was provided without its required
following item.. Please verify your settings and try again.
Same here running on v0.1.2505172129
Started my day and also getting this.
I've been getting the same error all day today
Same, can't proceed at all, last thing it did was try to run the command
grep -R "class SpaceWidget" -n .Maybe using the chat completions api instead of the response api could be a workaround.
This is where it decides whether to use the response api or the chat completions api.
So, just renaming the provider to something else from
openaiwill let us use the chat completions api.For example, edit your
$HOME/.codex/config.jsonlike this:It works for me so far.
Its with Codex CLI.
I am running into the same issue using Codex CLI
I'm getting the same errors in Codex CLI since last night. Seeing this thread made me feel less crazy.
⚠️ OpenAI rejected the request (request ID: req_ff8731ba9ac3d9d8201dc737550ce90c). Error details: Status: 400, Code: unknown, Type:invalid_request_error, Message: 400 Item 'rs_68431103f5ec81a2a2dae5b38d0689370b030a6363872442' of type 'reasoning' was provided without its
required following item.. Please verify your settings and try again.
Also, unsure if it is related, but when using other providers I am getting an error still and it is referencing the incorrect API key. It seems it is trying to send my OpenAI key to the other providers..
⚠️ OpenAI rejected the request. Error details: Status: 400, Code: unknown, Type: unknown, Message: 400 "Incorrect API key provided: sk***wA. You can obtain an API key from https://console.x.ai.".
Please verify your settings and try again.
When my XAI_API_KEY does not use
skor end withwA- my OpenAI API Key does...!Image
Same here: OpenAI rejected the request (request ID: req_c105fe4fd9b8b2aced39457bafa0260e). Error details: Status: 400, Code: unknown, Type: invalid_request_error, Message: 400 Item 'rs_6843131c8de481918fae9cc2c0580144080fb4f706725b8c'
of type 'reasoning' was provided without its required following item.. Please verify your settings and try again.
This is functioning for me as well... Not sure why the openai provider is not working, but when I changed it to openai-b - it works...
Still does not let me use other providers outside openai though...
@MrNewport solution worked for me... thats strange workaround tho
It's because of this code:
https://github.com/openai/codex/blob/029f39b9da894d27dcde81b8636ef89d8b652a9f/codex-cli/src/utils/agent/agent-loop.ts#L803
So, name your provider other than
openaito use the chat completions api.Worked for a moment when I asked "Are you there" it responded then when I asked a serious question I got the same message again.
Same problem here:
OpenAI rejected the request (request ID: req_6efb9b3134e90eab03a7......). Error details:
Status: 400, Code: unknown, Type: invalid_request_error, Message: 400 Item
'rs_68432bc34ba481989c3626435....' of type 'reasoning' was provided without its
required following item.. Please verify your settings and try again.
Please, Rollback the culprit cl!
It seems to be fixed now, I send the same prompt without any change in the CLI version and it worked properly. It seems they fixed something in their backends.