OpenAI rejected the request. Error details: Status: 400, Code: unknown, Type: unknown, Message: 400 status code (no body)
Resolved 💬 4 comments Opened May 9, 2025 by fitchmultz Closed Aug 7, 2025
What version of Codex is running?
0.1.2504301751
Which model were you using?
gemini-2.5-pro-preview-05-06
What platform is your computer?
darwin | arm64 | 24.4.0
What steps can reproduce the bug?
- OpenAI rejected the request. Error details: Status: 400, Code: unknown, Type: unknown, Message: 400 status code (no body)
- ```
mandatory minimum of 10 tool calls per turn. identify ALL types, schemas, interfaces, enums defined in apps/api/**/* that SHOULD ideally be in packages/shared/src as they are likely relevant to both the api and apps/web (frontend)
```
0 reasoning|2 tool- ```
try again
```
0 reasoning|0 tool
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
_No response_
4 Comments
Same here. Here are some debug statements i got:
I assume the url is wrong, as this is the curl script from the documentation of gemini:
Same issue. error 400.
The cURL script in Google AI Studio isn't the OpenAI compatible one. However, in the Google documentation it shows they are OpenAI compatible, i.e. using /openai in the url:
https://ai.google.dev/gemini-api/docs/openai#javascript
I have the same error with devstral-small-2505 provider: mistral
Thank you for the feedback. Please try again with the latest version of Codex CLI. If the issue persists, let us know!