Rank, 14 days: 112 on the Codex sheet
7 people reported

All time, since Oct 10, including 6 thumbs-up on GitHub.

Custom model API key not found

“Linux 6.18.40.1-microsoft-standard-WSL2 x86_64 unknown”

Is this your bug? What gets counted gets fixed. Pile on.

Paste this into your agent. It files your report, with your error and version.

I hit this bug: rapsheet.dev/sheets/codex/issues/11029/file
Follow it to file my report. Show me the text before you send.

No install. No account. Public and anonymous. The link asks your agent for one report, nothing else. What it sends

Custom model provider fails to read API key from environment variable. With a custom model (Qwen3.8-27B), Codex is "unable to find the API key through environment variable" and raises "Missing environment variable: OPENAI_API_KEY".

Is this your bug?

File my report
Where
Codex CLI
Error text
Missing environment variable: OPENAI_API_KEY
Versions
0.162.1
Platforms
Windows
How bad
Breaks a normal workflow.

Related: Model at capacity errors

Not quite your bug?

  1. Model at capacity errors40 people
  2. Unexplained mid-session API key prompt5 people
  3. Workspace routing discovery failure4 people

Original reports1, newest first

  1. When using a custom model, codex is unable to find the API key through environment variable and raises error: Missing environment variable: OPENAI_API_KEYOn GitHub#52806

Do you work on Codex?

Claim its RAP Sheet to see what your users report and answer them in one place.