Asks for ChatGPT key when `-p azure`

Resolved 💬 5 comments Opened Jun 9, 2025 by wzhliang Closed Aug 7, 2025

What version of Codex is running?

0.1.2505172129

Which model were you using?

o3-mini

What platform is your computer?

Darwin 23.6.0 arm64 arm

What steps can reproduce the bug?

Export Azure related envars and run codex -p azure -m o3-mini.
codex asks for ChatGPT key, which is unexpected.

What is the expected behavior?

_No response_

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

5 Comments

meronz · 1 year ago

Same thing happens even when the ~/.codex/config.json file is configured appropriately

atericparker · 1 year ago

Believe this is the same bug this addresses? https://github.com/openai/codex/pull/1268

It runs that code regardless of provider.

dews · 1 year ago
Same thing happens even when the ~/.codex/config.json file is configured appropriately

For now, version 0.1.2505172129, I must set ~/.codex/config.json and provide key after cli prompt key. Setup env is useless.

muneebshahid · 1 year ago

Happens for our custom provider as well. using export <provider>_API_KEY= has no effect.

codex-maintainers · 1 year ago

Thanks for the feedback! Please try again on the latest version of Codex CLI. If the issue persists, let us know. We're primarily focused on the native/Rust implementation of Codex CLI and would love to see if this issue still occurs there.