OpenAI rejected the request

Resolved 💬 20 comments Opened Jun 6, 2025 by agarwalshashwat Closed Aug 12, 2025

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_

View original on GitHub ↗

19 Comments

oddish3 · 1 year ago

i also get this on codex mini latest on darwin

dozd · 1 year ago

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.

mafpub · 1 year ago

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.

th3wingman · 1 year ago

Same here running on v0.1.2505172129

    system
    ⚠️  OpenAI rejected the request (request ID: req_a5d7d74c5d3c4b28a5311260069d021a). Error details: Status: 400, Code: unknown, Type: invalid_request_error, Message: 400 Item 'rs_6842e9c6f668819bb0d8055f0df48d740c551216948139bb' of type 'reasoning' was provided without
     its required following item.. Please verify your settings and try again.
nonlin · 1 year ago

Started my day and also getting this.

rtorbiczuk-edrone · 1 year ago

I've been getting the same error all day today

Queatz · 1 year ago

Same, can't proceed at all, last thing it did was try to run the command grep -R "class SpaceWidget" -n .

ts-klassen · 1 year ago

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 openai will let us use the chat completions api.

For example, edit your $HOME/.codex/config.json like this:

--- a/config.json
+++ b/config.json
@@ -1,12 +1,17 @@
 {
   "model": "o4-mini",
-  "provider": "openai",
+  "provider": "openai-chat-completions",
   "providers": {
     "openai": {
       "name": "OpenAI",
       "baseURL": "https://api.openai.com/v1",
       "envKey": "OPENAI_API_KEY"
     },
+    "openai-chat-completions": {
+      "name": "OpenAIChatCompletions",
+      "baseURL": "https://api.openai.com/v1",
+      "envKey": "OPENAI_API_KEY"
+    },
     "openrouter": {
       "name": "OpenRouter",
       "baseURL": "https://openrouter.ai/api/v1",

It works for me so far.

nonlin · 1 year ago
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 openai will let us use the chat completions api. For example, edit your $HOME/.codex/config.json like this: `` --- a/config.json +++ b/config.json @@ -1,12 +1,17 @@ { "model": "o4-mini", - "provider": "openai", + "provider": "openai-chat-completions", "providers": { "openai": { "name": "OpenAI", "baseURL": "https://api.openai.com/v1", "envKey": "OPENAI_API_KEY" }, + "openai-chat-completions": { + "name": "OpenAIChatCompletions", + "baseURL": "https://api.openai.com/v1", + "envKey": "OPENAI_API_KEY" + }, "openrouter": { "name": "OpenRouter", "baseURL": "https://openrouter.ai/api/v1", `` It works for me so far.

Its with Codex CLI.

MrNewport · 1 year ago

I am running into the same issue using Codex CLI

OpenAI rejected the request (request ID: req_d25144ba7c52deae9c7c67e986c3b3a7). Error details: Status: 400, Code: unknown, Type: invalid_request_error, Message: 400 Item
    'rs_68430ebdf9ac8199b7224324cbaaa3af05ffefe50c40cb81' of type 'reasoning' was provided without its required following item.. Please verify your settings and try again.
prvctice · 1 year ago

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.

MrNewport · 1 year ago

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 sk or end with wA - my OpenAI API Key does...

!Image

chris-proactive · 1 year ago

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.

MrNewport · 1 year ago
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 openai will let us use the chat completions api. For example, edit your $HOME/.codex/config.json like this: `` --- a/config.json +++ b/config.json @@ -1,12 +1,17 @@ { "model": "o4-mini", - "provider": "openai", + "provider": "openai-chat-completions", "providers": { "openai": { "name": "OpenAI", "baseURL": "https://api.openai.com/v1", "envKey": "OPENAI_API_KEY" }, + "openai-chat-completions": { + "name": "OpenAIChatCompletions", + "baseURL": "https://api.openai.com/v1", + "envKey": "OPENAI_API_KEY" + }, "openrouter": { "name": "OpenRouter", "baseURL": "https://openrouter.ai/api/v1", `` It works for me so far.

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...

{
  "model": "o4-mini",
  "provider": "openai-b",
  "providers": {
    "openai": {
      "name": "OpenAI",
      "baseURL": "https://api.openai.com/v1",
      "envKey": "OPENAI_API_KEY"
    },
    "openai-b": {
      "name": "OpenAI-B",
      "baseURL": "https://api.openai.com/v1",
      "envKey": "OPENAI_API_KEY"
    },

Still does not let me use other providers outside openai though...

devformed · 1 year ago

@MrNewport solution worked for me... thats strange workaround tho

ts-klassen · 1 year ago

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 openai to use the chat completions api.

nonlin · 1 year ago
> 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 openai will let us use the chat completions api. > For example, edit your $HOME/.codex/config.json like this: > `` > --- a/config.json > +++ b/config.json > @@ -1,12 +1,17 @@ > { > "model": "o4-mini", > - "provider": "openai", > + "provider": "openai-chat-completions", > "providers": { > "openai": { > "name": "OpenAI", > "baseURL": "https://api.openai.com/v1", > "envKey": "OPENAI_API_KEY" > }, > + "openai-chat-completions": { > + "name": "OpenAIChatCompletions", > + "baseURL": "https://api.openai.com/v1", > + "envKey": "OPENAI_API_KEY" > + }, > "openrouter": { > "name": "OpenRouter", > "baseURL": "https://openrouter.ai/api/v1", > ` > > > > > > > > > > > > It works for me so far. 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... ` { "model": "o4-mini", "provider": "openai-b", "providers": { "openai": { "name": "OpenAI", "baseURL": "https://api.openai.com/v1", "envKey": "OPENAI_API_KEY" }, "openai-b": { "name": "OpenAI-B", "baseURL": "https://api.openai.com/v1", "envKey": "OPENAI_API_KEY" }, `` Still does not let me use other providers outside openai though...

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.

maciano33 · 1 year ago

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!

maciano33 · 1 year ago

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.

Showing cached comments. Read the full discussion on GitHub ↗