Proposal: Add warning to user if the API key for selected provider does not exist
Resolved 💬 2 comments Opened Apr 22, 2025 by loeclos Closed Apr 22, 2025
💡 Likely answer: A maintainer (Naveenxyz, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
v0.1.2504211509
Which model were you using?
None
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What steps can reproduce the bug?
Use the --provider flag and choose a provider (do not add <provider>_API_KEY=******* to .env file) and input prompt. Nothing seems to go wrong, but the AI does not return response.
What is the expected behavior?
AI returns a valid response
What do you see instead?
Nothing.
Additional information
I think it would be great that some kind of warning showed up saying, "The api key does not exist for your chosen provider. Please consult https://www.github.com/openai/codex for more info."
2 Comments
https://github.com/openai/codex/pull/523 should provide more context when api keys are not set
Should be fixed as mentioned by @Naveenxyz