blank output with workaround forced providers

Resolved 💬 2 comments Opened May 31, 2025 by mirage335 Closed Aug 7, 2025

What version of Codex is running?

0.1.2505172129

Which model were you using?

openai/codex-mini, openai/o4-mini, etc

What platform is your computer?

Docker containers, WSL distributions, etc.

What steps can reproduce the bug?

unset OPENAI_API_KEY
unset OPENROUTER_API_KEY
export OPENAI_BASE_URL="https://openrouter.ai/api/v1"
export OPENAI_API_KEY="sk-***-21"
codex --model openai/o4-mini
codex --model openai/codex-mini

What is the expected behavior?

Inputting a prompt after codex starts or as an additional CLI parameter should cause normal output.

What do you see instead?

Thinking... for a few seconds. Then nothing. Unless using the default OpenAI provider.

Additional information

This workaround comes from https://github.com/openai/codex/issues/987?utm_source=chatgpt.com .

Attempting to use the OPENROUTER_API_KEY otherwise (ie. '--provider openrouter --model openai/codex-mini') with of course does not work.

Also I find the '--full-auto' command line parameter useful in some environments, it is potentially a powerful convenience to have codex working everywhere and able to correct issues within a VPS, Docker container, etc.

Alternative providers in case of downtime, as well as experimenting with other models for the same reason, is important.

Ideally, it would be very nice if these commands just worked normally:

export OPENROUTER_API_KEY="sk-***-21"
codex --approval-mode full-auto --provider openrouter --model openai/codex-mini

By the way, codex really does seem to have a lot of great potential, I hope this gets resolved soon.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗